From 873d19350139c6ed731ac1348ffa92746dbee118 Mon Sep 17 00:00:00 2001 From: Navy Date: Mon, 25 May 2020 00:42:28 +0300 Subject: [PATCH] modlogs --- .../components/settings/moderation/ModerationLog.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/structure/client/components/settings/moderation/ModerationLog.js b/structure/client/components/settings/moderation/ModerationLog.js index 5e1fbea..f720eed 100644 --- a/structure/client/components/settings/moderation/ModerationLog.js +++ b/structure/client/components/settings/moderation/ModerationLog.js @@ -16,6 +16,7 @@ class ModerationLogsSetting extends Setting { 'modLog', 'modLogs' ], + usage: ' [value..]', guarded: true, resolve: 'GUILD', examples: [ @@ -43,7 +44,7 @@ class ModerationLogsSetting extends Setting { if (response) { if (args.length < 2 && response.method !== 'list') return { - msg: message.format('S_MODERATIONLOG_ARGS404'), + msg: message.format('MISSING_ARGS'), error: true } @@ -84,15 +85,16 @@ class ModerationLogsSetting extends Setting { } fields(guild) { + const setting = guild._settings[this.index]; return [ { name: '》Channel', - value: guild.resolveChannel(guild._settings[this.index]?.channel) || '`N/A`', + value: guild.resolveChannel(setting?.channel) || '`N/A`', inline: true }, { 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 } ];