Skip to content

ApplicationCommandOptionData

typedef · Source

An option for an application command or subcommand. In addition to the listed properties, when used as a parameter, API style snake_case properties can be used for compatibility with generators like @discordjs/builders. Note that providing a value for the camelCase counterpart for any snake_case property will discard the provided snake_case property. Type: Object

Properties

type

type: ApplicationCommandOptionType | number

The type of the option

name

name: string

The name of the option

nameLocalizations

optional

nameLocalizations: Object<Locale, string>

The name localizations for the option

description

description: string

The description of the option

descriptionLocalizations

optional

descriptionLocalizations: Object<Locale, string>

The description localizations for the option

autocomplete

optional

autocomplete: boolean

Whether the option is an autocomplete option

required

optional

required: boolean

Whether the option is required

choices

optional

choices: Array<ApplicationCommandOptionChoiceData>

The choices of the option for the user to pick from

options

optional

options: Array<ApplicationCommandOptionData>

Additional options if this option is a subcommand (group)

channelTypes

optional

channelTypes: Array<ChannelType> | Array<number>

When the option type is channel, the allowed types of channels that can be selected

minValue

optional

minValue: number

The minimum value for an INTEGER or NUMBER option

maxValue

optional

maxValue: number

The maximum value for an INTEGER or NUMBER option

minLength

optional

minLength: number

The minimum length for a STRING option (maximum of 6000)

maxLength

optional

maxLength: number

The maximum length for a STRING option (maximum of 6000)

Unofficial software. Not affiliated with or supported by Discord.