diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-02-19 18:52:41 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2022-02-19 18:52:41 -0500 |
commit | e78beed6c7e094ef48aad5d18da01b2bbed4536c (patch) | |
tree | 32676793af5f7bdc39d438ff284fa5b959274e96 /src/commands/moderation/massBan.ts | |
parent | a3103b629250de3fb97a40a4f9ff7e7ba28f4d16 (diff) | |
download | tanzanite-e78beed6c7e094ef48aad5d18da01b2bbed4536c.tar.gz tanzanite-e78beed6c7e094ef48aad5d18da01b2bbed4536c.tar.bz2 tanzanite-e78beed6c7e094ef48aad5d18da01b2bbed4536c.zip |
fix: a ton of shit
Diffstat (limited to 'src/commands/moderation/massBan.ts')
-rw-r--r-- | src/commands/moderation/massBan.ts | 5 |
1 files changed, 3 insertions, 2 deletions
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, |