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/config/log.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/config/log.ts')
-rw-r--r-- | src/commands/config/log.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/commands/config/log.ts b/src/commands/config/log.ts index 52cb8f5..c61a6d5 100644 --- a/src/commands/config/log.ts +++ b/src/commands/config/log.ts @@ -1,6 +1,5 @@ -import { BushCommand, guildLogsArr, type BushMessage, type BushSlashMessage, type GuildLogType } from '#lib'; +import { ArgType, BushCommand, guildLogsArr, type BushMessage, type BushSlashMessage, type GuildLogType } from '#lib'; import { type ArgumentOptions, type Flag } from 'discord-akairo'; -import { type TextChannel } from 'discord.js'; export default class LogCommand extends BushCommand { public constructor() { @@ -62,7 +61,10 @@ export default class LogCommand extends BushCommand { return { log_type, channel }; } - public override async exec(message: BushMessage | BushSlashMessage, args: { log_type: GuildLogType; channel: TextChannel }) { + public override async exec( + message: BushMessage | BushSlashMessage, + args: { log_type: GuildLogType; channel: ArgType<'textChannel'> } + ) { if (!message.guild) return await message.util.reply(`${util.emojis.error} This command can only be used in servers.`); const currentLogs = await message.guild.getSetting('logChannels'); const oldChannel = currentLogs[args.log_type] ?? undefined; |