diff options
Diffstat (limited to 'src/lib/extensions/BushCommand.ts')
-rw-r--r-- | src/lib/extensions/BushCommand.ts | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/lib/extensions/BushCommand.ts b/src/lib/extensions/BushCommand.ts index bc6ff68..b62d26e 100644 --- a/src/lib/extensions/BushCommand.ts +++ b/src/lib/extensions/BushCommand.ts @@ -1,33 +1,47 @@ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */ /* eslint-disable @typescript-eslint/no-explicit-any */ -import { Command, CommandOptions } from 'discord-akairo'; +import { ArgumentGenerator, ArgumentOptions, ArgumentPromptOptions, Command, CommandOptions } from 'discord-akairo'; import { Snowflake } from 'discord.js'; import { BushClient } from './BushClient'; import { BushCommandHandler } from './BushCommandHandler'; import { BushSlashMessage } from './BushInteractionMessage'; import { BushMessage } from './BushMessage'; +export interface BushArgumentOptions extends ArgumentOptions { + id: string; + description?: string; + prompt?: ArgumentPromptOptions; +} + export interface BushCommandOptions extends CommandOptions { hidden?: boolean; restrictedChannels?: Snowflake[]; restrictedGuilds?: Snowflake[]; description: { content: string; - usage: string; - examples: string[]; + usage: string | string[]; + examples: string | string[]; }; + args?: BushArgumentOptions[] | ArgumentGenerator; + category: string; } export class BushCommand extends Command { public declare client: BushClient; + public declare handler: BushCommandHandler; + public options: BushCommandOptions; + /** The channels the command is limited to run in. */ public restrictedChannels: Snowflake[]; + /** The guilds the command is limited to run in. */ public restrictedGuilds: Snowflake[]; + /** Whether the command is hidden from the help command. */ public hidden: boolean; + constructor(id: string, options?: BushCommandOptions) { super(id, options); this.options = options; |