diff --git a/src/structure/components/settings/moderation/MentionFilter.js b/src/structure/components/settings/moderation/MentionFilter.js index 30f16c0..574bb0a 100644 --- a/src/structure/components/settings/moderation/MentionFilter.js +++ b/src/structure/components/settings/moderation/MentionFilter.js @@ -39,7 +39,7 @@ class MentionFilter extends FilterSetting { type: 'BOOLEAN' }), new CommandOption({ - name: 'unqiue', + name: 'unique', description: 'Mentions for the same user count as one', type: 'BOOLEAN' }), @@ -88,7 +88,7 @@ class MentionFilter extends FilterSetting { if (method && list) { - if (list.value === 'actions') this._action(interaction, method.value, setting[list.value]); + if (list.value === 'actions') return this._action(interaction, method.value, setting[list.value]); else if (method.value === 'list') return { message: setting[list.value].join(', ') }; const { guild } = interaction; @@ -121,6 +121,11 @@ class MentionFilter extends FilterSetting { } + _createTrigger(message, action, actionObject) { + // TODO allow different actions based on amount of mentions + actionObject.trigger = 'generic'; + } + fields(guild) { const setting = guild._settings[this.name]; return [ @@ -141,7 +146,7 @@ class MentionFilter extends FilterSetting { { name: 'GENERAL_UNIQUE', value: guild.format('GENERAL_STATE', { - bool: setting.unique + bool: Boolean(setting.unique) }, { code: true }), inline: true },