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/ban.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/commands/moderation/ban.ts') diff --git a/src/commands/moderation/ban.ts b/src/commands/moderation/ban.ts index fea5543..88ad8e4 100644 --- a/src/commands/moderation/ban.ts +++ b/src/commands/moderation/ban.ts @@ -87,8 +87,15 @@ export default class BanCommand extends BushCommand { reason, days, force - }: { user: User | Snowflake; reason?: { duration: number; contentWithoutTime: string }; days?: number; force: boolean } + }: { + user: User | Snowflake; + reason?: { duration: number | null; contentWithoutTime: string }; + days?: number; + force: boolean; + } ): Promise { + if (reason?.duration === null) reason.duration = 0; + if (!message.guild) return message.util.reply(`${util.emojis.error} This command cannot be used in dms.`); const member = message.guild!.members.cache.get((_user as User)?.id); const user = member?.user ?? (await util.resolveNonCachedUser(_user)); -- cgit