From ac11dbdd440b49ee5cdfd13897d16c5a1256b3ca Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Mon, 14 Feb 2022 19:53:06 +0200 Subject: [PATCH] small fixes --- .../components/commands/administration/Settings.js | 1 + .../components/settings/administration/Protection.js | 2 +- src/structure/components/settings/logging/Members.js | 4 ++-- src/structure/components/settings/logging/Messages.js | 4 ++-- .../components/settings/moderation/AutoModeration.js | 4 ++-- .../components/settings/moderation/InviteFilter.js | 4 ++-- .../components/settings/moderation/LinkFilter.js | 4 ++-- .../components/settings/moderation/WordFilter.js | 8 ++++---- 8 files changed, 16 insertions(+), 15 deletions(-) diff --git a/src/structure/components/commands/administration/Settings.js b/src/structure/components/commands/administration/Settings.js index 18c402b..338dae7 100644 --- a/src/structure/components/commands/administration/Settings.js +++ b/src/structure/components/commands/administration/Settings.js @@ -43,6 +43,7 @@ class SettingsCommand extends SlashCommand { description: guild.format('SETTINGS_LIST'), fields: [] }; + const entries = Object.entries(modules); for (const [module, values] of entries) embed.fields.push({ diff --git a/src/structure/components/settings/administration/Protection.js b/src/structure/components/settings/administration/Protection.js index 067d037..5b1a8ee 100644 --- a/src/structure/components/settings/administration/Protection.js +++ b/src/structure/components/settings/administration/Protection.js @@ -81,7 +81,7 @@ class ProtectionSetting extends Setting { value: `\`${setting.type}\``, inline: true }, { - name: 'IGNORED_ROLES', + name: 'GENERAL_ROLES', value: setting.roles.map((r) => `<@&${r.id}>`).join(' ') || '`N/A`', inline: true } diff --git a/src/structure/components/settings/logging/Members.js b/src/structure/components/settings/logging/Members.js index e2038ca..c0518c3 100644 --- a/src/structure/components/settings/logging/Members.js +++ b/src/structure/components/settings/logging/Members.js @@ -59,10 +59,10 @@ class MemberLog extends Setting { value: setting.channel ? `<#${setting.channel}>` : '`N/A`', inline: true }, { - name: 'GENERAL_JOINMSG', + name: 'SETTING_MEMBERLOG_JOIN', value: setting.join || '`N/A`', }, { - name: 'GENERAL_LEAVEMSG', + name: 'SETTING_MEMBERLOG_LEAVE', value: setting.leave || '`N/A`', } ]; diff --git a/src/structure/components/settings/logging/Messages.js b/src/structure/components/settings/logging/Messages.js index 21e3d62..bdca725 100644 --- a/src/structure/components/settings/logging/Messages.js +++ b/src/structure/components/settings/logging/Messages.js @@ -146,12 +146,12 @@ class MessageLog extends Setting { inline: true }, { - name: 'IGNORED_ROLES', + name: 'GENERAL_BYPASS', value: setting.bypass.map((r) => `<@&${r}>`).join(', ') || '`N/A`', inline: true }, { - name: 'IGNORED_CHANNELS', + name: 'GENERAL_IGNORED', value: setting.ignore.map((c) => `<#${c}>`).join(', ') || '`N/A`', inline: true } diff --git a/src/structure/components/settings/moderation/AutoModeration.js b/src/structure/components/settings/moderation/AutoModeration.js index c52dc95..e5279ba 100644 --- a/src/structure/components/settings/moderation/AutoModeration.js +++ b/src/structure/components/settings/moderation/AutoModeration.js @@ -100,12 +100,12 @@ class Automod extends Setting { inline: true }, { - name: 'GENERAL_USEPREV', + name: 'SETTING_AUTOMOD_USEPREV', value: guild.format('GENERAL_STATE', { bool: setting.usePrevious }, { code: true }), inline: true }, { - name: 'GENERAL_THRESHOLDS', + name: 'SETTING_AUTOMOD_THRESHOLDS', value: Object.entries(setting.thresholds).reduce((acc, [points, action]) => { acc.push(`**${points}:** \`${action.type}\`${action.length ? ', ' + Util.humanise(action.length) : ''}`); return acc; diff --git a/src/structure/components/settings/moderation/InviteFilter.js b/src/structure/components/settings/moderation/InviteFilter.js index 1795c08..d688e1c 100644 --- a/src/structure/components/settings/moderation/InviteFilter.js +++ b/src/structure/components/settings/moderation/InviteFilter.js @@ -152,7 +152,7 @@ class InviteFilterSetting extends FilterSetting { inline: true }, { - name: 'SETTING_FILTER_IGNORED', + name: 'GENERAL_IGNORED', value: setting.ignore.map((channel) => `<#${channel}>`).join(', ') || '`N/A`', inline: true }, @@ -166,7 +166,7 @@ class InviteFilterSetting extends FilterSetting { value: setting.actions.reduce((acc, val) => { let str = `**${val.type}**`; if (val.points) str += ` (${val.points} points)`; - if (val.duration) str += ` for ${Util.humanise(val.duration, true, true, true)}`; + if (val.duration) str += ` for ${Util.humanise(val.duration)}`; if (val.force) str += ` - **FORCE**`; if (val.prune) str += ` - **PRUNE**`; str += `\n__**Triggers:**__ ${val.trigger instanceof Array diff --git a/src/structure/components/settings/moderation/LinkFilter.js b/src/structure/components/settings/moderation/LinkFilter.js index 591bab6..ec8e803 100644 --- a/src/structure/components/settings/moderation/LinkFilter.js +++ b/src/structure/components/settings/moderation/LinkFilter.js @@ -173,7 +173,7 @@ class LinkFilterSetting extends FilterSetting { inline: true }, { - name: 'SETTING_FILTER_IGNORED', + name: 'GENERAL_IGNORED', value: setting.ignore.map((channel) => `<#${channel}>`).join(', ') || '`N/A`', inline: true }, @@ -187,7 +187,7 @@ class LinkFilterSetting extends FilterSetting { value: setting.actions.reduce((acc, val) => { let str = `**${val.type}**`; if (val.points) str += ` (${val.points} points)`; - if (val.duration) str += ` for ${Util.humanise(val.duration, true, true, true)}`; + if (val.duration) str += ` for ${Util.humanise(val.duration)}`; if (val.force) str += ` - **FORCE**`; if (val.prune) str += ` - **PRUNE**`; str += `\n__**Triggers:**__ ${val.trigger instanceof Array diff --git a/src/structure/components/settings/moderation/WordFilter.js b/src/structure/components/settings/moderation/WordFilter.js index e7db2f9..55a8bf0 100644 --- a/src/structure/components/settings/moderation/WordFilter.js +++ b/src/structure/components/settings/moderation/WordFilter.js @@ -199,14 +199,14 @@ class WordFilterSetting extends FilterSetting { { name: 'GENERAL_STATUS', value: guild.format('GENERAL_STATE', { - bool: Boolean(setting.enabled) + bool: setting.enabled }, { code: true }), inline: true }, { name: 'GENERAL_SILENT', value: guild.format('GENERAL_STATE', { - bool: Boolean(setting.silent) + bool: setting.silent }, { code: true }), inline: true }, @@ -232,7 +232,7 @@ class WordFilterSetting extends FilterSetting { inline: true }, { - name: 'SETTING_FILTER_IGNORED', + name: 'GENERAL_IGNORED', value: setting.ignore.map((channel) => `<#${channel}>`).join(', ') || '`N/A`', inline: true }, @@ -246,7 +246,7 @@ class WordFilterSetting extends FilterSetting { value: setting.actions.reduce((acc, val) => { let str = `**${val.type}**`; if (val.points) str += ` (${val.points} points)`; - if (val.duration) str += ` for ${Util.humanise(val.duration, true, true, true)}`; + if (val.duration) str += ` for ${Util.humanise(val.duration)}`; if (val.force) str += ` - **FORCE**`; if (val.prune) str += ` - **PRUNE**`; str += `\n__**Triggers:**__ ${val.trigger instanceof Array