From dca5041fab25eb7c81cabd6ddbd418b311c65fcc Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sat, 18 Sep 2021 22:27:57 -0400 Subject: fix slowmode --- src/commands/moderation/mute.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/commands/moderation/mute.ts') 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 { + if (reason?.duration === null) reason.duration = 0; const member = message.guild!.members.cache.get(user.id); if (!member) return await message.util.reply( -- cgit