Skip to main content

DiscordApplicationCommandOption

@discordeno/botDocs


Documentation / @discordeno/bot / DiscordApplicationCommandOption

Interface: DiscordApplicationCommandOption

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

Properties

autocomplete?

optional autocomplete: boolean

If autocomplete interactions are enabled for this option.

Remarks

Only valid in options of type String, Integer, or Number

When choices are provided, this may not be set to true

Defined in

packages/types/dist/types/discord.d.ts:2546


channel_types?

optional channel_types: ChannelTypes[]

The channels shown will be restricted to these types

Remarks

Only valid in option of type Channel

Defined in

packages/types/dist/types/discord.d.ts:2553


choices?

optional choices: DiscordApplicationCommandOptionChoice[]

Choices for the option from which the user can choose, max 25

Remarks

Only valid in options of type String, Integer, or Number

If you provide an array of choices, they will be the ONLY accepted values for this option

Defined in

packages/types/dist/types/discord.d.ts:2530


description

description: string

1-100 character description

Defined in

packages/types/dist/types/discord.d.ts:2512


description_localizations?

optional description_localizations: null | Partial<Record<Locales, string>>

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

Defined in

packages/types/dist/types/discord.d.ts:2514


max_length?

optional max_length: number

The maximum permitted length, should be in the range of from 0 to 600

Remarks

Only valid in options of type String

Defined in

packages/types/dist/types/discord.d.ts:2581


max_value?

optional max_value: number

The maximum permitted value

Remarks

Only valid in options of type Integer or Number

Defined in

packages/types/dist/types/discord.d.ts:2567


min_length?

optional min_length: number

The minimum permitted length, should be in the range of from 0 to 600

Remarks

Only valid in options of type String

Defined in

packages/types/dist/types/discord.d.ts:2574


min_value?

optional min_value: number

The minimum permitted value

Remarks

Only valid in options of type Integer or Number

Defined in

packages/types/dist/types/discord.d.ts:2560


name

name: string

Name of command, 1-32 characters.

Remarks

This value should be unique within an array of DiscordApplicationCommandOption

ChatInput command names must match the following regex ^[-_\p{L}\p{N}\p{sc=Deva}\p{sc=Thai}]{1,32}$ with the unicode flag set. If there is a lowercase variant of any letters used, you must use those. Characters with no lowercase variants and/or uncased letters are still allowed.

User and Message commands may be mixed case and can include spaces.

Defined in

packages/types/dist/types/discord.d.ts:2508


name_localizations?

optional name_localizations: null | Partial<Record<Locales, string>>

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

Defined in

packages/types/dist/types/discord.d.ts:2510


options?

optional options: DiscordApplicationCommandOption[]

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

Remarks

Only valid in option of type SubCommand or SubCommandGroup

Defined in

packages/types/dist/types/discord.d.ts:2537


required?

optional required: boolean

If the parameter is required or optional. default false

Remarks

Valid in all option types except SubCommand and SubCommandGroup

Defined in

packages/types/dist/types/discord.d.ts:2521


type

type: ApplicationCommandOptionTypes

Type of option

Defined in

packages/types/dist/types/discord.d.ts:2495