Skip to main content
Version: 1.x

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>;
generateMetadata?: CommandMetadataFunction;
metadata?: CommandMetadata;
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>

generateMetadata​

metadata​

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>