The command will load into kommando.

Hierarchy

  • Command

Constructors

Properties

callbacks: {
    default: ((itr: ChatInputCommandInteraction<CacheType>) => void);
    [key: string]: ((itr: ChatInputCommandInteraction) => void);
}

The callbacks of the command.

Type declaration

  • [key: string]: ((itr: ChatInputCommandInteraction) => void)
      • (itr: ChatInputCommandInteraction): void
      • Parameters

        • itr: ChatInputCommandInteraction

        Returns void

  • default: ((itr: ChatInputCommandInteraction<CacheType>) => void)
      • (itr: ChatInputCommandInteraction<CacheType>): void
      • Parameters

        • itr: ChatInputCommandInteraction<CacheType>

        Returns void

data: SlashCommandBuilder

The data of the command.

description: string

The description of the command.

name: string

The name of the command.

rawRequires: string[]

The raw requirements before load.

requires: (undefined | Requirement)[]

The requirements of the command.

toJSON: (() => RESTPostAPIChatInputApplicationCommandsJSONBody)

Type declaration

    • (): RESTPostAPIChatInputApplicationCommandsJSONBody
    • Make this class to API application command.

      Returns RESTPostAPIChatInputApplicationCommandsJSONBody

Methods

  • Execute the command.

    Parameters

    • itr: ChatInputCommandInteraction<CacheType>

      The interaction to execute the command with.

    Returns Promise<undefined | Command>

  • Add callback to the command.

    Parameters

    • callback: ((itr: ChatInputCommandInteraction<CacheType>) => void)

      The callback to add.

        • (itr: ChatInputCommandInteraction<CacheType>): void
        • Parameters

          • itr: ChatInputCommandInteraction<CacheType>

          Returns void

    • Optional subCommand: string

      The sub command to add the callback to (Can contain spaces if it's subcommand group).

    Returns Command

Generated using TypeDoc