From e05f25f4b98cac3c2409cee9a664ab5ea6251467 Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Mon, 27 Dec 2021 13:12:49 -0500 Subject: better typings and some other stuff --- src/commands/config/log.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/commands/config/log.ts') 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; -- cgit