msglogs fields

This commit is contained in:
Erik 2022-01-18 16:34:23 +02:00
parent 6af5eea98d
commit 83a3c0b456
No known key found for this signature in database
GPG Key ID: FEFF4B220DDF5589

View File

@ -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; module.exports = MessageLog;