CommandFileData
CommandFileData
Represents the data structure for a command file, including its data, options, and runners.
Signature
interface CommandFileData {
data: CommandData;
options?: CommandOptions;
chatInput: CommandRunner<ChatInputCommandInteraction>;
messageContextMenu?: CommandRunner<MessageContextMenuCommandInteraction>;
userContextMenu?: CommandRunner<UserContextMenuCommandInteraction>;
autocomplete?: CommandRunner<AutocompleteInteraction>;
category: string | null;
path: string;
}
data
property
The command data, which includes the name, description, and options.
options
property
The options for the command, including permissions and execution conditions.
chatInput
property
CommandRunner<ChatInputCommandInteraction>
The function to run when the command is executed as slash command.
messageContextMenu
property
CommandRunner<MessageContextMenuCommandInteraction>
The function to run when the command is executed as a message context menu command.
userContextMenu
property
CommandRunner<UserContextMenuCommandInteraction>
The function to run when the command is executed as a user context menu command.
autocomplete
property
CommandRunner<AutocompleteInteraction>
The function to run when the command is executed as an autocomplete interaction.
category
property
string | null
The category of the command, if applicable.
path
property
string
The file path of the command.