APIApplicationCommand

https://discord.com/developers/docs/interactions/application-commands#application-command-object

Signature

export interface APIApplicationCommand

Properties

name: string;

1-32 character name; `CHAT_INPUT` command names must be all lowercase matching `^[-_\p{L}\p{N}\p{sc=Deva}\p{sc=Thai}]{1,32}$`

description: string;

1-100 character description for `CHAT_INPUT` commands, empty string for `USER` and `MESSAGE` commands

nsfw?: boolean;

Indicates whether the command is age-restricted, defaults to `false`

contexts?: InteractionContextType[] | null;

Interaction context(s) where the command can be used, only for globally-scoped commands. By default, all interaction context types included for new commands `[0,1,2]`.

version: Snowflake;

Autoincrementing version identifier updated during substantial record changes