ChannelSelectMenuBuilder

export class ChannelSelectMenuBuilder extends BuilderChannelSelectMenuComponent
export class ChannelSelectMenuBuilder extends BuilderChannelSelectMenuComponent
Class used to build select menu components to be sent through the API
constructor(data?)
Constructs a new instance of the ChannelSelectMenuBuilder class
NameTypeOptionalDescription
dataPartial<ChannelSelectMenuComponentData | APIChannelSelectComponent>YesNone
Readonly
data:Partial<DataType>
The API data associated with this component.
Inherited from ComponentBuilder
addChannelTypes(...types):this
Adds channel types to this select menu.
NameTypeOptionalDescription
...typesRestOrArray<ChannelType>NoThe channel types to use
Static
Creates a new select menu builder from JSON data
NameTypeOptionalDescription
otherJSONEncodable<APISelectMenuComponent> | APISelectMenuComponentNoThe other data
setChannelTypes(...types):this
Sets channel types for this select menu.
NameTypeOptionalDescription
...typesRestOrArray<ChannelType>NoThe channel types to use
setCustomId(customId):this
Sets the custom id for this select menu.
NameTypeOptionalDescription
customIdstringNoThe custom id to use
Inherited from BaseSelectMenuBuilder
setDisabled(disabled?):this
Sets whether this select menu is disabled.
NameTypeOptionalDescription
disabledbooleanYesWhether this select menu is disabled
Inherited from BaseSelectMenuBuilder
setMaxValues(maxValues):this
Sets the maximum values that must be selected in the select menu.
NameTypeOptionalDescription
maxValuesnumberNoThe maximum values that must be selected
Inherited from BaseSelectMenuBuilder
setMinValues(minValues):this
Sets the minimum values that must be selected in the select menu.
NameTypeOptionalDescription
minValuesnumberNoThe minimum values that must be selected
Inherited from BaseSelectMenuBuilder
setPlaceholder(placeholder):this
Sets the placeholder for this select menu.
NameTypeOptionalDescription
placeholderstringNoThe placeholder to use
Inherited from BaseSelectMenuBuilder
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.