Interface CommandObj

interface CommandObj {
    data: RESTPostAPIChatInputApplicationCommandsJSONBody;
    guild?: string[];
    execute(interaction: ChatInputCommandInteraction): Promise<void>;
}

Hierarchy

Properties

Methods

Properties

data: RESTPostAPIChatInputApplicationCommandsJSONBody

The transpiled command data. This is returned by the internal transpile method.

guild?: string[]

If not specified, the command will be registered globally. If specified, the command will be registered only in the specified guilds.

Methods

  • This should run when the command is executed by a user.

    Parameters

    • interaction: ChatInputCommandInteraction

    Returns Promise<void>