diff --git a/structure/client/components/settings/moderation/WordFilter.js b/structure/client/components/settings/moderation/WordFilter.js index b222772..e274a24 100644 --- a/structure/client/components/settings/moderation/WordFilter.js +++ b/structure/client/components/settings/moderation/WordFilter.js @@ -77,8 +77,9 @@ module.exports = class WordFilter extends FilterSetting { } else if (['explicit', 'fuzzy', 'regex', 'whitelist'].includes(method)) { - if (method === 'regex') args = args.map((arg) => Util.sanitiseRegex(arg)); - const resolved = await resolver.resolveMethod(args, { + const [first, ...rest] = args; // First arg should skip sanitisation + if (method === 'regex') args = rest.map((arg) => Util.sanitiseRegex(arg)); + const resolved = await resolver.resolveMethod([first, ...args], { existing: setting[method], allowedMethods: ['add', 'remove', 'set', 'reset'] });