diff --git a/structure/client/components/settings/moderation/InviteFilter.js b/structure/client/components/settings/moderation/InviteFilter.js index e68593a..11dddcd 100644 --- a/structure/client/components/settings/moderation/InviteFilter.js +++ b/structure/client/components/settings/moderation/InviteFilter.js @@ -120,6 +120,11 @@ module.exports = class InviteFilter extends FilterSetting { } + if (langParams.error) return { + error: true, + msg: langParams.msg + }; + await message.guild._updateSettings({ [this.index]: setting }); return { error: false, diff --git a/structure/client/components/settings/moderation/LinkFilter.js b/structure/client/components/settings/moderation/LinkFilter.js index 0d04b72..218424c 100644 --- a/structure/client/components/settings/moderation/LinkFilter.js +++ b/structure/client/components/settings/moderation/LinkFilter.js @@ -202,6 +202,11 @@ module.exports = class LinkFilter extends FilterSetting { msg: message.format('ERR_INVALID_METHOD', { method }) }; + if (langParams.error) return { + error: true, + msg: langParams.msg + }; + await message.guild._updateSettings({ [this.index]: setting }); return { error: false, diff --git a/structure/client/components/settings/moderation/MentionFilter.js b/structure/client/components/settings/moderation/MentionFilter.js index 2170c62..9912535 100644 --- a/structure/client/components/settings/moderation/MentionFilter.js +++ b/structure/client/components/settings/moderation/MentionFilter.js @@ -149,6 +149,11 @@ module.exports = class MentionFilter extends FilterSetting { msg: message.format('ERR_INVALID_METHOD', { method }) }; + if (langParams.error) return { + error: true, + msg: langParams.msg + }; + await message.guild._updateSettings({ [this.index]: setting }); return { error: false, diff --git a/structure/client/components/settings/moderation/WordFilter.js b/structure/client/components/settings/moderation/WordFilter.js index f6ebc19..8580260 100644 --- a/structure/client/components/settings/moderation/WordFilter.js +++ b/structure/client/components/settings/moderation/WordFilter.js @@ -53,6 +53,7 @@ module.exports = class WordFilter extends FilterSetting { async handle(message, params) { + // eslint-disable-next-line prefer-const let [method, ...args] = params; method = method.toLowerCase(); @@ -254,6 +255,11 @@ module.exports = class WordFilter extends FilterSetting { }; } + if (langParams.error) return { + error: true, + msg: langParams.msg + }; + await message.guild._updateSettings({ [this.index]: setting }); return { error: false, @@ -263,6 +269,7 @@ module.exports = class WordFilter extends FilterSetting { } async _createTrigger(message, action, actionObject, setting) { + const response = await message.prompt(message.format('S_WORDFILTER_ACTION_ADD_TRIGGERS'), { time: 60 * 1000 }); if (!response) { if (setting.actions.find((ac) => ac.trigger === 'generic')) return {