small fixes

This commit is contained in:
Erik 2022-02-14 19:53:06 +02:00
parent 762490f913
commit ac11dbdd44
No known key found for this signature in database
GPG Key ID: FEFF4B220DDF5589
8 changed files with 16 additions and 15 deletions

View File

@ -43,6 +43,7 @@ class SettingsCommand extends SlashCommand {
description: guild.format('SETTINGS_LIST'), description: guild.format('SETTINGS_LIST'),
fields: [] fields: []
}; };
const entries = Object.entries(modules); const entries = Object.entries(modules);
for (const [module, values] of entries) for (const [module, values] of entries)
embed.fields.push({ embed.fields.push({

View File

@ -81,7 +81,7 @@ class ProtectionSetting extends Setting {
value: `\`${setting.type}\``, value: `\`${setting.type}\``,
inline: true inline: true
}, { }, {
name: 'IGNORED_ROLES', name: 'GENERAL_ROLES',
value: setting.roles.map((r) => `<@&${r.id}>`).join(' ') || '`N/A`', value: setting.roles.map((r) => `<@&${r.id}>`).join(' ') || '`N/A`',
inline: true inline: true
} }

View File

@ -59,10 +59,10 @@ class MemberLog extends Setting {
value: setting.channel ? `<#${setting.channel}>` : '`N/A`', value: setting.channel ? `<#${setting.channel}>` : '`N/A`',
inline: true inline: true
}, { }, {
name: 'GENERAL_JOINMSG', name: 'SETTING_MEMBERLOG_JOIN',
value: setting.join || '`N/A`', value: setting.join || '`N/A`',
}, { }, {
name: 'GENERAL_LEAVEMSG', name: 'SETTING_MEMBERLOG_LEAVE',
value: setting.leave || '`N/A`', value: setting.leave || '`N/A`',
} }
]; ];

View File

@ -146,12 +146,12 @@ class MessageLog extends Setting {
inline: true inline: true
}, },
{ {
name: 'IGNORED_ROLES', name: 'GENERAL_BYPASS',
value: setting.bypass.map((r) => `<@&${r}>`).join(', ') || '`N/A`', value: setting.bypass.map((r) => `<@&${r}>`).join(', ') || '`N/A`',
inline: true inline: true
}, },
{ {
name: 'IGNORED_CHANNELS', name: 'GENERAL_IGNORED',
value: setting.ignore.map((c) => `<#${c}>`).join(', ') || '`N/A`', value: setting.ignore.map((c) => `<#${c}>`).join(', ') || '`N/A`',
inline: true inline: true
} }

View File

@ -100,12 +100,12 @@ class Automod extends Setting {
inline: true inline: true
}, },
{ {
name: 'GENERAL_USEPREV', name: 'SETTING_AUTOMOD_USEPREV',
value: guild.format('GENERAL_STATE', { bool: setting.usePrevious }, { code: true }), value: guild.format('GENERAL_STATE', { bool: setting.usePrevious }, { code: true }),
inline: true inline: true
}, },
{ {
name: 'GENERAL_THRESHOLDS', name: 'SETTING_AUTOMOD_THRESHOLDS',
value: Object.entries(setting.thresholds).reduce((acc, [points, action]) => { value: Object.entries(setting.thresholds).reduce((acc, [points, action]) => {
acc.push(`**${points}:** \`${action.type}\`${action.length ? ', ' + Util.humanise(action.length) : ''}`); acc.push(`**${points}:** \`${action.type}\`${action.length ? ', ' + Util.humanise(action.length) : ''}`);
return acc; return acc;

View File

@ -152,7 +152,7 @@ class InviteFilterSetting extends FilterSetting {
inline: true inline: true
}, },
{ {
name: 'SETTING_FILTER_IGNORED', name: 'GENERAL_IGNORED',
value: setting.ignore.map((channel) => `<#${channel}>`).join(', ') || '`N/A`', value: setting.ignore.map((channel) => `<#${channel}>`).join(', ') || '`N/A`',
inline: true inline: true
}, },
@ -166,7 +166,7 @@ class InviteFilterSetting extends FilterSetting {
value: setting.actions.reduce((acc, val) => { value: setting.actions.reduce((acc, val) => {
let str = `**${val.type}**`; let str = `**${val.type}**`;
if (val.points) str += ` (${val.points} points)`; 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.force) str += ` - **FORCE**`;
if (val.prune) str += ` - **PRUNE**`; if (val.prune) str += ` - **PRUNE**`;
str += `\n__**Triggers:**__ ${val.trigger instanceof Array str += `\n__**Triggers:**__ ${val.trigger instanceof Array

View File

@ -173,7 +173,7 @@ class LinkFilterSetting extends FilterSetting {
inline: true inline: true
}, },
{ {
name: 'SETTING_FILTER_IGNORED', name: 'GENERAL_IGNORED',
value: setting.ignore.map((channel) => `<#${channel}>`).join(', ') || '`N/A`', value: setting.ignore.map((channel) => `<#${channel}>`).join(', ') || '`N/A`',
inline: true inline: true
}, },
@ -187,7 +187,7 @@ class LinkFilterSetting extends FilterSetting {
value: setting.actions.reduce((acc, val) => { value: setting.actions.reduce((acc, val) => {
let str = `**${val.type}**`; let str = `**${val.type}**`;
if (val.points) str += ` (${val.points} points)`; 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.force) str += ` - **FORCE**`;
if (val.prune) str += ` - **PRUNE**`; if (val.prune) str += ` - **PRUNE**`;
str += `\n__**Triggers:**__ ${val.trigger instanceof Array str += `\n__**Triggers:**__ ${val.trigger instanceof Array

View File

@ -199,14 +199,14 @@ class WordFilterSetting extends FilterSetting {
{ {
name: 'GENERAL_STATUS', name: 'GENERAL_STATUS',
value: guild.format('GENERAL_STATE', { value: guild.format('GENERAL_STATE', {
bool: Boolean(setting.enabled) bool: setting.enabled
}, { code: true }), }, { code: true }),
inline: true inline: true
}, },
{ {
name: 'GENERAL_SILENT', name: 'GENERAL_SILENT',
value: guild.format('GENERAL_STATE', { value: guild.format('GENERAL_STATE', {
bool: Boolean(setting.silent) bool: setting.silent
}, { code: true }), }, { code: true }),
inline: true inline: true
}, },
@ -232,7 +232,7 @@ class WordFilterSetting extends FilterSetting {
inline: true inline: true
}, },
{ {
name: 'SETTING_FILTER_IGNORED', name: 'GENERAL_IGNORED',
value: setting.ignore.map((channel) => `<#${channel}>`).join(', ') || '`N/A`', value: setting.ignore.map((channel) => `<#${channel}>`).join(', ') || '`N/A`',
inline: true inline: true
}, },
@ -246,7 +246,7 @@ class WordFilterSetting extends FilterSetting {
value: setting.actions.reduce((acc, val) => { value: setting.actions.reduce((acc, val) => {
let str = `**${val.type}**`; let str = `**${val.type}**`;
if (val.points) str += ` (${val.points} points)`; 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.force) str += ` - **FORCE**`;
if (val.prune) str += ` - **PRUNE**`; if (val.prune) str += ` - **PRUNE**`;
str += `\n__**Triggers:**__ ${val.trigger instanceof Array str += `\n__**Triggers:**__ ${val.trigger instanceof Array