forked from Galactic/galactic-bot
modlogs
This commit is contained in:
parent
7ac552a145
commit
873d193501
@ -16,6 +16,7 @@ class ModerationLogsSetting extends Setting {
|
|||||||
'modLog',
|
'modLog',
|
||||||
'modLogs'
|
'modLogs'
|
||||||
],
|
],
|
||||||
|
usage: '<method|value> [value..]',
|
||||||
guarded: true,
|
guarded: true,
|
||||||
resolve: 'GUILD',
|
resolve: 'GUILD',
|
||||||
examples: [
|
examples: [
|
||||||
@ -43,7 +44,7 @@ class ModerationLogsSetting extends Setting {
|
|||||||
if (response) {
|
if (response) {
|
||||||
|
|
||||||
if (args.length < 2 && response.method !== 'list') return {
|
if (args.length < 2 && response.method !== 'list') return {
|
||||||
msg: message.format('S_MODERATIONLOG_ARGS404'),
|
msg: message.format('MISSING_ARGS'),
|
||||||
error: true
|
error: true
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,15 +85,16 @@ class ModerationLogsSetting extends Setting {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fields(guild) {
|
fields(guild) {
|
||||||
|
const setting = guild._settings[this.index];
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
name: '》Channel',
|
name: '》Channel',
|
||||||
value: guild.resolveChannel(guild._settings[this.index]?.channel) || '`N/A`',
|
value: guild.resolveChannel(setting?.channel) || '`N/A`',
|
||||||
inline: true
|
inline: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '》Logged Infractions',
|
name: '》Logged Infractions',
|
||||||
value: guild._settings[this.index].infractions.map(i=>`\`${i}\``).join(', ') || '`N/A`',
|
value: setting?.infractions.map(i=>`\`${i}\``).join(', ') || '`N/A`',
|
||||||
inline: true
|
inline: true
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
Loading…
Reference in New Issue
Block a user