Skip to main content

ApplicationCommandOption

Documentation


Documentation / @discordeno/bot / ApplicationCommandOption

Interface: ApplicationCommandOption

Defined in: transformers/types.ts:254

Properties​

autocomplete?​

optional autocomplete?: boolean

Defined in: transformers/types.ts:282

if autocomplete interactions are enabled for this String, Integer, or Number type option


channelTypes?​

optional channelTypes?: ChannelTypes[]

Defined in: transformers/types.ts:272

If the option is a channel type, the channels shown will be restricted to these types


choices?​

optional choices?: ApplicationCommandOptionChoice[]

Defined in: transformers/types.ts:268

Choices for string and int types for the user to pick from


description​

description: string

Defined in: transformers/types.ts:262

1-100 character description


descriptionLocalizations?​

optional descriptionLocalizations?: Partial<Record<Locales, string>>

Defined in: transformers/types.ts:264

Localization object for the description field. Values follow the same restrictions as description


fileTypes?​

optional fileTypes?: string[]

Defined in: transformers/types.ts:300

The accepted file types for the file upload

Remarks​

The supported values are image, video, audio or any dot prefixed extension (e.g. .pdf)

Extensions are case-insensitive and are normalized to lowercase, so .PDF and .pdf are equivalent.

Discord recommends using the provided file groups rather than listing extensions individually. If you do list extensions individually, include .jpg for image uploads and both .mp4 and .mov for video uploads, as some mobile clients rely on those extensions.

This feature only checks the file extension against the filename and does not inspect the file contents. You are still responsible for validating the actual contents of the file.

Up to 10 file types.


maxLength?​

optional maxLength?: number

Defined in: transformers/types.ts:280

Maximum length desired.


maxValue?​

optional maxValue?: number

Defined in: transformers/types.ts:276

Maximum number desired.


minLength?​

optional minLength?: number

Defined in: transformers/types.ts:278

Minimum length desired.


minValue?​

optional minValue?: number

Defined in: transformers/types.ts:274

Minimum number desired.


name​

name: string

Defined in: transformers/types.ts:258

1-32 character name matching lowercase ^[\w-]{1,32}$


nameLocalizations?​

optional nameLocalizations?: Partial<Record<Locales, string>>

Defined in: transformers/types.ts:260

Localization object for the name field. Values follow the same restrictions as name


options?​

optional options?: ApplicationCommandOption[]

Defined in: transformers/types.ts:270

If the option is a subcommand or subcommand group type, this nested options will be the parameters


required?​

optional required?: boolean

Defined in: transformers/types.ts:266

If the parameter is required or optional--default false


type​

type: ApplicationCommandOptionTypes

Defined in: transformers/types.ts:256

Value of Application Command Option Type