aboutsummaryrefslogtreecommitdiff
path: root/src/listeners
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-07-30 20:49:01 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-07-30 20:49:01 -0400
commitc6c0a3ed6bc6fb6723c47fd013534bf1146dc856 (patch)
treef9cd571864649a69f109d839af16d461b976e86f /src/listeners
parent66173b72b2d5d33a15f667acb4cafbd03ae752a0 (diff)
downloadtanzanite-c6c0a3ed6bc6fb6723c47fd013534bf1146dc856.tar.gz
tanzanite-c6c0a3ed6bc6fb6723c47fd013534bf1146dc856.tar.bz2
tanzanite-c6c0a3ed6bc6fb6723c47fd013534bf1146dc856.zip
remove debug stuff and remove message.deleteable because its broken
Diffstat (limited to 'src/listeners')
-rw-r--r--src/listeners/message/automodCreate.ts10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/listeners/message/automodCreate.ts b/src/listeners/message/automodCreate.ts
index 990632b..c2db29a 100644
--- a/src/listeners/message/automodCreate.ts
+++ b/src/listeners/message/automodCreate.ts
@@ -41,15 +41,13 @@ export default class AutomodMessageCreateListener extends BushListener {
const highestOffence = Object.values(offences).sort((a, b) => b - a)[0];
- client.console.debug(message.deletable);
-
switch (highestOffence) {
case 0: {
- if (message.deletable) void message.delete();
+ void message.delete().catch(() => {});
break;
}
case 1: {
- if (message.deletable) void message.delete();
+ void message.delete().catch(() => {});
void message.member.warn({
moderator: message.guild.me,
reason: 'Saying a blacklisted word.'
@@ -57,7 +55,7 @@ export default class AutomodMessageCreateListener extends BushListener {
break;
}
case 2: {
- if (message.deletable) void message.delete();
+ void message.delete().catch(() => {});
void message.member.mute({
moderator: message.guild.me,
reason: 'Saying a blacklisted word.',
@@ -66,7 +64,7 @@ export default class AutomodMessageCreateListener extends BushListener {
break;
}
case 3: {
- if (message.deletable) void message.delete();
+ void message.delete().catch(() => {});
void message.member.mute({
moderator: message.guild.me,
reason: 'Saying a blacklisted word.',