From 83db032fb91996c926a5d007a9e5fa4abed65871 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Thu, 30 Dec 2021 16:55:37 -0500 Subject: add timeout command and fix some other moderation commands --- src/lib/common/AutoMod.ts | 6 +++--- src/lib/common/util/Moderation.ts | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'src/lib/common') diff --git a/src/lib/common/AutoMod.ts b/src/lib/common/AutoMod.ts index cc1bbbd..d7da532 100644 --- a/src/lib/common/AutoMod.ts +++ b/src/lib/common/AutoMod.ts @@ -183,7 +183,7 @@ export class AutoMod { case Severity.WARN: { color = util.colors.yellow; void this.message.delete().catch((e) => deleteError.bind(this, e)); - void this.message.member?.warn({ + void this.message.member?.bushWarn({ moderator: this.message.guild!.me!, reason: `[AutoMod] ${highestOffence.reason}` }); @@ -193,7 +193,7 @@ export class AutoMod { case Severity.TEMP_MUTE: { color = util.colors.orange; void this.message.delete().catch((e) => deleteError.bind(this, e)); - void this.message.member?.mute({ + void this.message.member?.bushMute({ moderator: this.message.guild!.me!, reason: `[AutoMod] ${highestOffence.reason}`, duration: 900_000 // 15 minutes @@ -204,7 +204,7 @@ export class AutoMod { case Severity.PERM_MUTE: { color = util.colors.red; void this.message.delete().catch((e) => deleteError.bind(this, e)); - void this.message.member?.mute({ + void this.message.member?.bushMute({ moderator: this.message.guild!.me!, reason: `[AutoMod] ${highestOffence.reason}`, duration: 0 // permanent diff --git a/src/lib/common/util/Moderation.ts b/src/lib/common/util/Moderation.ts index c06ad25..a09930b 100644 --- a/src/lib/common/util/Moderation.ts +++ b/src/lib/common/util/Moderation.ts @@ -36,7 +36,9 @@ export class Moderation { | 'add a punishment role to' | 'remove a punishment role from' | 'block' - | 'unblock', + | 'unblock' + | 'timeout' + | 'untimeout', checkModerator = true, force = false ): Promise { -- cgit