aboutsummaryrefslogtreecommitdiff
path: root/src/commands/moderation/slowmode.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-08-29 18:30:04 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-08-29 18:30:04 -0400
commita51dc607be54e600248c8c3c86f9881470ff4158 (patch)
tree6a3c6f5132fca493639790fb68b3368bc700990b /src/commands/moderation/slowmode.ts
parent0d71ac0234f7e71d60ae727a9f1db9ad66a47bde (diff)
downloadtanzanite-a51dc607be54e600248c8c3c86f9881470ff4158.tar.gz
tanzanite-a51dc607be54e600248c8c3c86f9881470ff4158.tar.bz2
tanzanite-a51dc607be54e600248c8c3c86f9881470ff4158.zip
level image, fixes, revamped role command (still broken), continued working on settings command
Diffstat (limited to 'src/commands/moderation/slowmode.ts')
-rw-r--r--src/commands/moderation/slowmode.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/commands/moderation/slowmode.ts b/src/commands/moderation/slowmode.ts
index 1d47616..04fe3e4 100644
--- a/src/commands/moderation/slowmode.ts
+++ b/src/commands/moderation/slowmode.ts
@@ -66,12 +66,11 @@ export default class SlowModeCommand extends BushCommand {
if (length) {
length =
typeof length === 'string' && !['off', 'none', 'disable'].includes(length)
- ? await Argument.cast('duration', client.commandHandler.resolver, message as BushMessage, length)
+ ? await util.arg.cast('duration', client.commandHandler.resolver, message as BushMessage, length)
: length;
}
- // @ts-expect-error: stop being dumb smh
- const length2: number = ['off', 'none', 'disable'].includes(length) ? 0 : length;
+ const length2: number = ['off', 'none', 'disable'].includes(length as string) ? 0 : (length as number);
const setSlowmode = await (channel as ThreadChannel | TextChannel)
.setRateLimitPerUser(length2 / 1000, `Changed by ${message.author.tag} (${message.author.id}).`)