diff --git a/index.ts b/index.ts index 1aff347..bfc6cc8 100644 --- a/index.ts +++ b/index.ts @@ -7,4 +7,4 @@ export { SubcommandOption } from './src/classes/SubcommandOption.js'; export { IResolver } from './src/interfaces/Resolver.js'; export { OptionType, CommandOptionDefinition } from './src/interfaces/CommandOption.js'; -export { CommandDefinition, ICommand } from './src/interfaces/Command.js'; \ No newline at end of file +export { CommandDefinition, ICommand, CommandOpts } from './src/interfaces/Command.js'; \ No newline at end of file diff --git a/src/interfaces/Command.ts b/src/interfaces/Command.ts index 0e921f6..3d2431d 100644 --- a/src/interfaces/Command.ts +++ b/src/interfaces/Command.ts @@ -4,7 +4,11 @@ import SubcommandOption from '../classes/SubcommandOption.js'; import { ArgsResult } from '../Parser.js'; import { CommandOptionDefinition } from './CommandOption.js'; - +export type CommandOpts = { + args?: ArgsResult, + subcommand?: string | null, + subcommandGroup?: string | null +} interface ICommand { name: string, @@ -20,7 +24,7 @@ interface ICommand { subcommandGroup(name: string): SubcommandGroupOption | null - execute(message: unknown, opts?: {args?: ArgsResult, subcommand?: string, subcommandGroup?: string}): Promise + execute(message: unknown, opts?: CommandOpts): Promise }