aboutsummaryrefslogtreecommitdiff
path: root/src/lib/common/AutoMod.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-12-13 20:22:20 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-12-13 20:22:20 -0500
commit9f705a0e5a90177784d45d20200dbaa46a569e78 (patch)
tree15390ea91d0ff3c3912be2b8cbe354f8703bb652 /src/lib/common/AutoMod.ts
parent2d6bb50ce8c979e543f0d2831b3db9d8644be477 (diff)
downloadtanzanite-9f705a0e5a90177784d45d20200dbaa46a569e78.tar.gz
tanzanite-9f705a0e5a90177784d45d20200dbaa46a569e78.tar.bz2
tanzanite-9f705a0e5a90177784d45d20200dbaa46a569e78.zip
fix more bugs
Diffstat (limited to 'src/lib/common/AutoMod.ts')
-rw-r--r--src/lib/common/AutoMod.ts9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/common/AutoMod.ts b/src/lib/common/AutoMod.ts
index c52754a..932d457 100644
--- a/src/lib/common/AutoMod.ts
+++ b/src/lib/common/AutoMod.ts
@@ -32,8 +32,7 @@ export class AutoMod {
*/
private async handle() {
if (this.message.channel.type === 'DM' || !this.message.guild) return;
- const hasFeature = this.message.guild.hasFeature;
- if (!(await hasFeature('automod'))) return;
+ if (!(await this.message.guild.hasFeature('automod'))) return;
const customAutomodPhrases = (await this.message.guild.getSetting('autoModPhases')) ?? {};
const badLinks: BadWords = {};
@@ -52,8 +51,8 @@ export class AutoMod {
const result = {
...this.checkWords(customAutomodPhrases),
- ...this.checkWords((await hasFeature('excludeDefaultAutomod')) ? {} : badWords),
- ...this.checkWords((await hasFeature('excludeAutomodScamLinks')) ? {} : badLinks)
+ ...this.checkWords((await this.message.guild.hasFeature('excludeDefaultAutomod')) ? {} : badWords),
+ ...this.checkWords((await this.message.guild.hasFeature('excludeAutomodScamLinks')) ? {} : badLinks)
};
if (Object.keys(result).length === 0) return;
@@ -77,7 +76,7 @@ export class AutoMod {
void this.log(highestOffence, color, result);
}
- if (!this.punished && (await hasFeature('delScamMentions'))) void this.checkScamMentions();
+ if (!this.punished && (await this.message.guild.hasFeature('delScamMentions'))) void this.checkScamMentions();
}
/**