SelectMenuBuilder

declare class SelectMenuBuilder extends ComponentBuilder<APISelectMenuComponent>
declare class SelectMenuBuilder extends ComponentBuilder<APISelectMenuComponent>
Represents a select menu component
constructor(data?)
Constructs a new instance of the SelectMenuBuilder class
NameTypeOptionalDescription
dataPartial<APISelectMenuComponent>YesNone
Readonly
The options within this select menu
addOptions(options):this
Adds options to this select menu
Returns
NameTypeOptionalDescription
optionsRestOrArray<SelectMenuOptionBuilder | APISelectMenuOption>NoThe options to add to this select menu
setCustomId(customId):this
Sets the custom id for this select menu
NameTypeOptionalDescription
customIdstringNoThe custom id to use for this select menu
setDisabled(disabled?):this
Sets whether this select menu is disabled
NameTypeOptionalDescription
disabledbooleanYesWhether this select menu is disabled
setMaxValues(maxValues):this
Sets the maximum values that must be selected in the select menu
NameTypeOptionalDescription
maxValuesnumberNoThe maximum values that must be selected
setMinValues(minValues):this
Sets the minimum values that must be selected in the select menu
NameTypeOptionalDescription
minValuesnumberNoThe minimum values that must be selected
setOptions(options):this
Sets the options on this select menu
NameTypeOptionalDescription
optionsRestOrArray<SelectMenuOptionBuilder | APISelectMenuOption>NoThe options to set on this select menu
setPlaceholder(placeholder):this
Sets the placeholder for this select menu
NameTypeOptionalDescription
placeholderstringNoThe placeholder to use for this select menu