A slash command string option.
Extends
ApplicationCommandOptionBaseThe description localizations of this command.
Inherited from SharedNameAndDescriptionThe description of this command.
Inherited from SharedNameAndDescriptionThe name localizations of this command.
Inherited from SharedNameAndDescriptionThe name of this command.
Inherited from SharedNameAndDescriptionWhether this option is required.
Inherited from ApplicationCommandOptionBaseDefault value
false
Readonly
The type of this option.
Whether this option utilizes autocomplete.
Inherited from ApplicationCommandOptionWithChoicesAndAutocompleteMixinThe choices of this option.
Inherited from ApplicationCommandOptionWithChoicesAndAutocompleteMixinReadonly
The type of this option.
Inherited from ApplicationCommandOptionWithChoicesAndAutocompleteMixinThis method runs required validators on this builder.
Inherited from ApplicationCommandOptionBaseSets the description of this command.
Name | Type | Optional | Description |
---|---|---|---|
description | string | No | The description to use |
Sets a description localization for this command.
Name | Type | Optional | Description |
---|---|---|---|
locale | LocaleString | No | The locale to set |
localizedDescription | string | null | No | The localized description for the given locale |
Sets the description localizations for this command.
Name | Type | Optional | Description |
---|---|---|---|
localizedDescriptions | LocalizationMap | null | No | The object of localized descriptions to set |
Sets the maximum length of this string option.
Name | Type | Optional | Description |
---|---|---|---|
max | number | No | The maximum length this option can be |
Sets the minimum length of this string option.
Name | Type | Optional | Description |
---|---|---|---|
min | number | No | The minimum length this option can be |
Sets the name of this command.
Name | Type | Optional | Description |
---|---|---|---|
name | string | No | The name to use |
Sets a name localization for this command.
Name | Type | Optional | Description |
---|---|---|---|
locale | LocaleString | No | The locale to set |
localizedName | string | null | No | The localized name for the given locale |
Sets the name localizations for this command.
Name | Type | Optional | Description |
---|---|---|---|
localizedNames | LocalizationMap | null | No | The object of localized names to set |
Sets whether this option is required.
Name | Type | Optional | Description |
---|---|---|---|
required | boolean | No | Whether this option should be required |
Serializes this builder to API-compatible JSON data.
Remarks
This method runs validations on the data before serializing it. As such, it may throw an error if the data is invalid.Adds multiple choices to this option.
Name | Type | Optional | Description |
---|---|---|---|
choices | APIApplicationCommandOptionChoice<T>[] | No | The choices to add |
Whether this option uses autocomplete.
Name | Type | Optional | Description |
---|---|---|---|
autocomplete | boolean | No | Whether this option should use autocomplete |
Sets multiple choices for this option.
Name | Type | Optional | Description |
---|---|---|---|
choices | Input | No | The choices to set |