From c8fbd46590fef8d02cf8d353da12cfdab3a1d48c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lobo=20Metal=C3=BArgico?= <43734867+LoboMetalurgico@users.noreply.github.com> Date: Mon, 9 Jan 2023 01:37:50 -0300 Subject: [PATCH] (fix): command interface doesn't accept context --- src/main/interfaces/IOptions.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/main/interfaces/IOptions.ts b/src/main/interfaces/IOptions.ts index ace92c4..6d7babf 100644 --- a/src/main/interfaces/IOptions.ts +++ b/src/main/interfaces/IOptions.ts @@ -1,4 +1,5 @@ import { ApplicationCommandOptionType, ApplicationCommandPermissions, ApplicationCommandType, APIApplicationCommandOptionChoice, CategoryChannelType } from 'discord.js'; +import { IDiscordCommandContext } from './IDiscordCommandContext'; import { DiscordClient } from '../discord'; export interface ICommandManagerOptions { @@ -37,7 +38,7 @@ export interface ICommandOptions { isLegacyCommand?: boolean; isSlashCommand?: boolean; allowDM?: boolean; - command: () => void; + command: (context: IDiscordCommandContext) => void; guildID?: string; aliases?: string[]; parameters?: ICommandParameter[]; @@ -47,5 +48,5 @@ export interface ICommandOptions { } export interface IAsyncCommandOptions extends ICommandOptions { - command: () => Promise; + command: (context: IDiscordCommandContext) => Promise; }