Skip to main content
Version: Next

AppCommandNative

AppCommandNative

Represents a native command structure used in CommandKit. This structure includes the command definition and various handlers for different interaction types. It can be used to define slash commands, context menu commands, and message commands.

Signature
interface AppCommandNative {
command: CommandData | Record<string, any>;
chatInput?: (ctx: Context) => Awaitable<unknown>;
autocomplete?: (ctx: Context) => Awaitable<unknown>;
message?: (ctx: Context) => Awaitable<unknown>;
messageContextMenu?: (ctx: Context) => Awaitable<unknown>;
userContextMenu?: (ctx: Context) => Awaitable<unknown>;
}

command

property
CommandData | Record<string, any>

chatInput

property
(ctx: Context) => Awaitable<unknown>

autocomplete

property
(ctx: Context) => Awaitable<unknown>

message

property
(ctx: Context) => Awaitable<unknown>

messageContextMenu

property
(ctx: Context) => Awaitable<unknown>

userContextMenu

property
(ctx: Context) => Awaitable<unknown>