Optional
data: Partial<StringSelectMenuComponentData | APIStringSelectComponent>Readonly
dataReadonly
optionsThe options within this select menu.
Rest
...options: RestOrArray<APISelectMenuOption | SelectMenuComponentOptionData | StringSelectMenuOptionBuilder>Sets the custom id for this select menu.
The custom id to use
Sets whether this select menu is disabled.
Optional
disabled: booleanWhether this select menu is disabled
Sets the maximum values that must be selected in the select menu.
The maximum values that must be selected
Sets the minimum values that must be selected in the select menu.
The minimum values that must be selected
Rest
...options: RestOrArray<APISelectMenuOption | SelectMenuComponentOptionData | StringSelectMenuOptionBuilder>Sets the placeholder for this select menu.
The placeholder to use
Removes, replaces, or inserts options for this select menu.
The index to start at
The number of options to remove
Rest
...options: RestOrArray<APISelectMenuOption | StringSelectMenuOptionBuilder>The replacing option objects or builders
This method behaves similarly to Array.prototype.splice(). It's useful for modifying and adjusting the order of existing options.
Remove the first option:
selectMenu.spliceOptions(0, 1);
Remove the first n option:
const n = 4;
selectMenu.spliceOptions(0, n);
Remove the last option:
selectMenu.spliceOptions(-1, 1);
Serializes this builder to API-compatible JSON data.
This method runs validations on the data before serializing it. As such, it may throw an error if the data is invalid.
Static
fromStatic
Private
normalizeGenerated using TypeDoc
The API data associated with this component.