aboutsummaryrefslogtreecommitdiff
path: root/src/lib/common/AutoMod.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-08 22:19:44 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-08 22:19:44 -0500
commit522a629a945ecaf1c53aae55fd2d5dfe7346aad4 (patch)
treece5d678411e62be783b7fba8b16bd815f6d1bb47 /src/lib/common/AutoMod.ts
parent939071ce079c804d3bf9d0781985526c01af18dd (diff)
downloadtanzanite-522a629a945ecaf1c53aae55fd2d5dfe7346aad4.tar.gz
tanzanite-522a629a945ecaf1c53aae55fd2d5dfe7346aad4.tar.bz2
tanzanite-522a629a945ecaf1c53aae55fd2d5dfe7346aad4.zip
fix automod
Diffstat (limited to 'src/lib/common/AutoMod.ts')
-rw-r--r--src/lib/common/AutoMod.ts8
1 files changed, 4 insertions, 4 deletions
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;