diff options
Diffstat (limited to 'src/commands/moderation/slowmode.ts')
-rw-r--r-- | src/commands/moderation/slowmode.ts | 5 |
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}).`) |