From 83a3c0b45655543de4f899a47ba6cd6ef31ab17f Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Tue, 18 Jan 2022 16:34:23 +0200 Subject: [PATCH] msglogs fields --- .../components/settings/Logging/MessageLog.js | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/structure/components/settings/Logging/MessageLog.js b/src/structure/components/settings/Logging/MessageLog.js index 50e0563..4942c8a 100644 --- a/src/structure/components/settings/Logging/MessageLog.js +++ b/src/structure/components/settings/Logging/MessageLog.js @@ -118,6 +118,37 @@ class MessageLog extends Setting { } + fields(guild) { + const setting = guild._settings[this.name]; + return [ + { + name: 'GENERAL_STATUS', + value: guild.format('SETTING_STATE', { bool: Boolean(setting.channel) }, { code: true }), + inline: true + }, + { + name: 'GENERAL_CHANNEL', + value: `<#${setting.channel}>` || '`N/A`', + inline: true + }, + { + name: 'ATTACHMENT_LOGS', + value: guild.format('SETTING_STATE', { bool: Boolean(setting.attachments) }, { code: true }), + inline: true + }, + { + name: 'IGNORED_ROLES', + value: setting.roles.map((r) => `<@&${r}>`).join(', ') || '`N/A`', + inline: true + }, + { + name: 'IGNORED_CHANNELS', + value: setting.channels.map((c) => `<#${c}>`).join(', ') || '`N/A`', + inline: true + } + ]; + } + } module.exports = MessageLog; \ No newline at end of file