From 522a629a945ecaf1c53aae55fd2d5dfe7346aad4 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sat, 8 Jan 2022 22:19:44 -0500 Subject: fix automod --- src/lib/common/AutoMod.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/lib/common/AutoMod.ts b/src/lib/common/AutoMod.ts index e791267..4b2b072 100644 --- a/src/lib/common/AutoMod.ts +++ b/src/lib/common/AutoMod.ts @@ -37,7 +37,7 @@ export class AutoMod { const badLinksSecretArray = util.getShared('badLinksSecret'); const badWordsRaw = util.getShared('badWords'); - // const customAutomodPhrases = (await this.message.guild.getSetting('autoModPhases')) ?? []; + const customAutomodPhrases = (await this.message.guild.getSetting('autoModPhases')) ?? []; const uniqueLinks = [...new Set([...badLinksArray, ...badLinksSecretArray])]; const badLinks: BadWordDetails[] = uniqueLinks.map((link) => ({ @@ -51,11 +51,11 @@ export class AutoMod { const parsedBadWords = Object.values(badWordsRaw).flat(); - const result = { - // ...this.checkWords(customAutomodPhrases), + const result = [ + ...this.checkWords(customAutomodPhrases), ...this.checkWords((await this.message.guild.hasFeature('excludeDefaultAutomod')) ? [] : parsedBadWords), ...this.checkWords((await this.message.guild.hasFeature('excludeAutomodScamLinks')) ? [] : badLinks) - }; + ]; if (result.length === 0) return; -- cgit