DiscordApplicationCommandOption
Documentation / @discordeno/types / DiscordApplicationCommandOption
Interface: DiscordApplicationCommandOption
Defined in: discord/interactions.ts:369
Properties
autocomplete?
optionalautocomplete?:boolean
Defined in: discord/interactions.ts:457
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
channel_types?
optionalchannel_types?:ChannelTypes[]
Defined in: discord/interactions.ts:420
The channels shown will be restricted to these types
Remarks
Only valid in option of type Channel
choices?
optionalchoices?:DiscordApplicationCommandOptionChoice[]
Defined in: discord/interactions.ts:406
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
description
description:
string
Defined in: discord/interactions.ts:388
1-100 character description
description_localizations?
optionaldescription_localizations?:Partial<Record<Locales,string>> |null
Defined in: discord/interactions.ts:390
Localization object for the description field. Values follow the same restrictions as description
max_length?
optionalmax_length?:number
Defined in: discord/interactions.ts:448
The maximum permitted length, should be in the range of from 0 to 600
Remarks
Only valid in options of type String
max_value?
optionalmax_value?:number
Defined in: discord/interactions.ts:434
The maximum permitted value
Remarks
Only valid in options of type Integer or Number
min_length?
optionalmin_length?:number
Defined in: discord/interactions.ts:441
The minimum permitted length, should be in the range of from 0 to 600
Remarks
Only valid in options of type String
min_value?
optionalmin_value?:number
Defined in: discord/interactions.ts:427
The minimum permitted value
Remarks
Only valid in options of type Integer or Number
name
name:
string
Defined in: discord/interactions.ts:384
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.
name_localizations?
optionalname_localizations?:Partial<Record<Locales,string>> |null
Defined in: discord/interactions.ts:386
Localization object for the name field. Values follow the same restrictions as name
options?
optionaloptions?:DiscordApplicationCommandOption[]
Defined in: discord/interactions.ts:413
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
required?
optionalrequired?:boolean
Defined in: discord/interactions.ts:397
If the parameter is required or optional. default false
Remarks
Valid in all option types except SubCommand and SubCommandGroup
type
Defined in: discord/interactions.ts:371
Type of option