aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-08-22 08:12:56 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-08-22 08:12:56 -0400
commit8ecea8349a872988bd0025e57c343242d3ba7d13 (patch)
tree0a8965b6cd18675835158bd40ae2de4e493599dc /lib
parent8226fb0aefd79dff1a353678e0ac6c85a952a0f5 (diff)
downloadtanzanite-8ecea8349a872988bd0025e57c343242d3ba7d13.tar.gz
tanzanite-8ecea8349a872988bd0025e57c343242d3ba7d13.tar.bz2
tanzanite-8ecea8349a872988bd0025e57c343242d3ba7d13.zip
add immune checks to member and presence automod
Diffstat (limited to 'lib')
-rw-r--r--lib/automod/MemberAutomod.ts1
-rw-r--r--lib/automod/MessageAutomod.ts1
-rw-r--r--lib/automod/PresenceAutomod.ts1
3 files changed, 3 insertions, 0 deletions
diff --git a/lib/automod/MemberAutomod.ts b/lib/automod/MemberAutomod.ts
index 6f71457..64ee3c1 100644
--- a/lib/automod/MemberAutomod.ts
+++ b/lib/automod/MemberAutomod.ts
@@ -16,6 +16,7 @@ export class MemberAutomod extends Automod {
protected async handle(): Promise<void> {
if (this.member.user.bot) return;
+ if (this.isImmune) return;
const badWordsRaw = Object.values(this.client.utils.getShared('badWords')).flat();
const customAutomodPhrases = (await this.guild.getSetting('autoModPhases')) ?? [];
diff --git a/lib/automod/MessageAutomod.ts b/lib/automod/MessageAutomod.ts
index 9673adf..0abd34c 100644
--- a/lib/automod/MessageAutomod.ts
+++ b/lib/automod/MessageAutomod.ts
@@ -18,6 +18,7 @@ export class MessageAutomod extends Automod {
super(message.member);
if (message.author.id === message.client.user?.id) return;
+
void this.handle();
}
diff --git a/lib/automod/PresenceAutomod.ts b/lib/automod/PresenceAutomod.ts
index b2e879d..1378252 100644
--- a/lib/automod/PresenceAutomod.ts
+++ b/lib/automod/PresenceAutomod.ts
@@ -16,6 +16,7 @@ export class PresenceAutomod extends Automod {
protected async handle(): Promise<void> {
if (this.presence.member!.user.bot) return;
+ if (this.isImmune) return;
const badWordsRaw = Object.values(this.client.utils.getShared('badWords')).flat();
const customAutomodPhrases = (await this.guild.getSetting('autoModPhases')) ?? [];