aboutsummaryrefslogtreecommitdiff
path: root/src/commands/moderation/mute.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-09-18 22:27:57 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-09-18 22:27:57 -0400
commitdca5041fab25eb7c81cabd6ddbd418b311c65fcc (patch)
treea3adf9b13d5ca13dcd44112ef18abd0e7315d4d1 /src/commands/moderation/mute.ts
parent04dc104726fa1519480ba1889c1307ec3ad9be19 (diff)
downloadtanzanite-dca5041fab25eb7c81cabd6ddbd418b311c65fcc.tar.gz
tanzanite-dca5041fab25eb7c81cabd6ddbd418b311c65fcc.tar.bz2
tanzanite-dca5041fab25eb7c81cabd6ddbd418b311c65fcc.zip
fix slowmode
Diffstat (limited to 'src/commands/moderation/mute.ts')
-rw-r--r--src/commands/moderation/mute.ts7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/commands/moderation/mute.ts b/src/commands/moderation/mute.ts
index fba548b..de79b32 100644
--- a/src/commands/moderation/mute.ts
+++ b/src/commands/moderation/mute.ts
@@ -58,8 +58,13 @@ export default class MuteCommand extends BushCommand {
public override async exec(
message: BushMessage | BushSlashMessage,
- { user, reason, force }: { user: BushUser; reason?: { duration: number; contentWithoutTime: string }; force: boolean }
+ {
+ user,
+ reason,
+ force
+ }: { user: BushUser; reason?: { duration: number | null; contentWithoutTime: string }; force: boolean }
): Promise<unknown> {
+ if (reason?.duration === null) reason.duration = 0;
const member = message.guild!.members.cache.get(user.id);
if (!member)
return await message.util.reply(