export declare class SlashCommandIntegerOption extends ApplicationCommandOptionBase implements ApplicationCommandNumericOptionMinMaxValueMixin
export declare class SlashCommandIntegerOption extends ApplicationCommandOptionBase implements ApplicationCommandNumericOptionMinMaxValueMixin
A slash command integer option.
Extends
ApplicationCommandOptionBaseReadonly
Optional
description_localizations?
:
LocalizationMap
The description localizations of this command.
Inherited from SharedNameAndDescriptionReadonly
description
:
string
The description of this command.
Inherited from SharedNameAndDescriptionReadonly
Optional
name_localizations?
:
LocalizationMap
The name localizations of this command.
Inherited from SharedNameAndDescriptionReadonly
name
:
string
The name of this command.
Inherited from SharedNameAndDescriptionReadonly
required
:
boolean
Whether this option is required.
Inherited from ApplicationCommandOptionBaseReadonly
type
:
ApplicationCommandOptionType.Integer
The type of this option.
Readonly
Optional
autocomplete?
:
boolean
Whether this option utilizes autocomplete.
Inherited from ApplicationCommandOptionWithChoicesAndAutocompleteMixinReadonly
Optional
choices?
:
APIApplicationCommandOptionChoice<T>[]
The choices of this option.
Inherited from ApplicationCommandOptionWithChoicesAndAutocompleteMixinReadonly
Optional
max_value?
:
number
The maximum value of this option.
Inherited from ApplicationCommandNumericOptionMinMaxValueMixinReadonly
Optional
min_value?
:
number
The minimum value of this option.
Inherited from ApplicationCommandNumericOptionMinMaxValueMixinProtected
runRequiredValidations()
:
void
This method runs required validators on this builder.
Inherited from ApplicationCommandOptionBasesetDescription(description)
:
this
Sets the description of this command.
Name | Type | Optional | Description |
---|---|---|---|
description | string | No | The description to use |
setDescriptionLocalization(locale, localizedDescription)
:
this
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 |
setDescriptionLocalizations(localizedDescriptions)
:
this
Sets the description localizations for this command.
Name | Type | Optional | Description |
---|---|---|---|
localizedDescriptions | LocalizationMap | null | No | The object of localized descriptions to set |
setMaxValue(max)
:
this
Sets the maximum number value of this option.
Name | Type | Optional | Description |
---|---|---|---|
max | number | No | The maximum value this option can be |
setMinValue(min)
:
this
Sets the minimum number value of this option.
Name | Type | Optional | Description |
---|---|---|---|
min | number | No | The minimum value this option can be |
setName(name)
:
this
Sets the name of this command.
Name | Type | Optional | Description |
---|---|---|---|
name | string | No | The name to use |
setNameLocalization(locale, localizedName)
:
this
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 |
setNameLocalizations(localizedNames)
:
this
Sets the name localizations for this command.
Name | Type | Optional | Description |
---|---|---|---|
localizedNames | LocalizationMap | null | No | The object of localized names to set |
setRequired(required)
:
this
Sets whether this option is required.
Name | Type | Optional | Description |
---|---|---|---|
required | boolean | No | Whether this option should be required |
toJSON()
:
APIApplicationCommandIntegerOption
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.addChoices(choices)
:
this
Adds multiple choices to this option.
Name | Type | Optional | Description |
---|---|---|---|
choices | APIApplicationCommandOptionChoice<T>[] | No | The choices to add |
setAutocomplete(autocomplete)
:
this
Whether this option uses autocomplete.
Name | Type | Optional | Description |
---|---|---|---|
autocomplete | boolean | No | Whether this option should use autocomplete |
setChoices(choices)
:
this
Sets multiple choices for this option.
Name | Type | Optional | Description |
---|---|---|---|
choices | Input | No | The choices to set |