diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-12-27 13:12:49 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-12-27 13:12:49 -0500 |
commit | e05f25f4b98cac3c2409cee9a664ab5ea6251467 (patch) | |
tree | f8e3dc4fde8f6deaa543b910acb9a725abbac999 /src/commands/moderation/slowmode.ts | |
parent | 84f246ebb5ddee984012d3043dcc67ffae806856 (diff) | |
download | tanzanite-e05f25f4b98cac3c2409cee9a664ab5ea6251467.tar.gz tanzanite-e05f25f4b98cac3c2409cee9a664ab5ea6251467.tar.bz2 tanzanite-e05f25f4b98cac3c2409cee9a664ab5ea6251467.zip |
better typings and some other stuff
Diffstat (limited to 'src/commands/moderation/slowmode.ts')
-rw-r--r-- | src/commands/moderation/slowmode.ts | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/commands/moderation/slowmode.ts b/src/commands/moderation/slowmode.ts index f4ab822..d38b266 100644 --- a/src/commands/moderation/slowmode.ts +++ b/src/commands/moderation/slowmode.ts @@ -1,13 +1,6 @@ -import { - BushCommand, - type BushMessage, - type BushNewsChannel, - type BushSlashMessage, - type BushTextChannel, - type BushThreadChannel -} from '#lib'; +import { ArgType, BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; import { Argument } from 'discord-akairo'; -import { TextChannel, ThreadChannel, type NewsChannel } from 'discord.js'; +import { TextChannel, ThreadChannel } from 'discord.js'; export default class SlowModeCommand extends BushCommand { public constructor() { @@ -52,8 +45,8 @@ export default class SlowModeCommand extends BushCommand { length, channel }: { - length: number | 'off' | 'none' | 'disable' | null; - channel: TextChannel | ThreadChannel | BushTextChannel | BushNewsChannel | BushThreadChannel | NewsChannel; + length: ArgType<'duration'> | ArgType<'durationSeconds'> | 'off' | 'none' | 'disable' | null; + channel: ArgType<'channel'>; } ) { if (message.channel!.type === 'DM') |