From e78beed6c7e094ef48aad5d18da01b2bbed4536c Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Sat, 19 Feb 2022 18:52:41 -0500 Subject: fix: a ton of shit --- src/commands/moderation/massBan.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/commands/moderation/massBan.ts') diff --git a/src/commands/moderation/massBan.ts b/src/commands/moderation/massBan.ts index 5621011..e4aeb55 100644 --- a/src/commands/moderation/massBan.ts +++ b/src/commands/moderation/massBan.ts @@ -56,6 +56,9 @@ export default class MassBanCommand extends BushCommand { args: { users: ArgType<'string'>; reason: OptionalArgType<'string'>; days: OptionalArgType<'integer'> } ) { assert(message.inGuild()); + + args.days ??= message.util.parsed?.alias?.includes('dban') ? 1 : 0; + const ids = args.users.split(/\n| /).filter((id) => id.length > 0); if (ids.length === 0) return message.util.send(`${util.emojis.error} You must provide at least one user id.`); for (const id of ids) { @@ -67,8 +70,6 @@ export default class MassBanCommand extends BushCommand { return message.util.reply(`${util.emojis.error} The delete days must be an integer between 0 and 7.`); } - if (message.util.parsed?.alias?.includes('dban') && !args.days) args.days = 1; - const promises = ids.map((id) => message.guild.bushBan({ user: id, -- cgit