Skip to content
On this page

CommandOptions

NameTypeDescriptionDefaultOptional
adminOnlyBooleanIf the command is for bot admins only0
argsArray<CommandMessageArgument>The options for command (message-commands only)None
categoryStringThe category of the commandNone
channelCommandOptionOnlyWhre the command can be executedNone
clientPermissionsArray<String>The bot permissions required[]
cooldownNumberThe cooldown time in seconde0
defaultPermissionBooleanWhether the command is enabled by default when the app is added to a guild
descriptionStringThe description of the commandNone
descriptionLocalizations[Object<Locale, String>The description of the command in an other languagesNone
examplesString orArray<String>The examples of the commandNone
nameStringThe name of the commandNone
nameLocalizations[Object<Locale, String>The name of the command in an other languagesNone
optionsArray<ApplicationCommandOptionData>The options for command (slash-commands only)None
typeMESSAGE_COMMAND or SLASH_COMMAND or CONTEXT_MENU_USER or CONTEXT_MENU_MESSAGEThe type of the commandNone
usageString orArray<String>The usage of the commandNone
userPermissionsArray<String>The user permissions required[]

CommandOptionOnly

  • GUILD

  • DM

  • GLOBAL

Type : String

CommandMessageArgument

NameTypeDescriptionDefaultOptional
nameStringThe name of the command
default*The default value of argument
typeCommandMessageArgsTypeThe type of the commandSTRING

CommandMessageArgType

  • STRING : String argument

  • NUMBER : Number argument

  • BOOLEAN : Boolean argument

  • REST : The string with text (without previous arguments)

  • COMMAND : A loaded command

  • GUILD : A guild

  • CHANNEL : A guild channel

  • MEMBER : A guild member

  • GUILD_EMOJI : A guild emoji

  • ROLE : A guild role

  • USER : A discord user

Type : String