A builder that creates API-compatible JSON data for mentionable select menus.
Creates a new select menu from API data.
Example
Creating a select menu from an API data object:Example
Creating a select menu using setters and API data:| Name | Type | Optional | Description |
|---|---|---|---|
| data | Partial<APIMentionableSelectComponent> | Yes | The API data to create this select menu with |
The API data associated with this component.
Inherited from ComponentBuilderAdds default roles to this auto populated select menu.
| Name | Type | Optional | Description |
|---|---|---|---|
| ...roles | RestOrArray<Snowflake> | No | The roles to add |
Adds default users to this auto populated select menu.
| Name | Type | Optional | Description |
|---|---|---|---|
| ...users | RestOrArray<Snowflake> | No | The users to add |
Adds default values to this auto populated select menu.
| Name | Type | Optional | Description |
|---|---|---|---|
| ...values | RestOrArray<APISelectMenuDefaultValue<SelectMenuDefaultValueType.Role> | APISelectMenuDefaultValue<SelectMenuDefaultValueType.User>> | No | The values to add |
Clears the id of this component, defaulting to a default incremented id.
Inherited from ComponentBuilderSets the custom id for this select menu.
| Name | Type | Optional | Description |
|---|---|---|---|
| customId | string | No | The custom id to use |
Sets default values for this auto populated select menu.
| Name | Type | Optional | Description |
|---|---|---|---|
| ...values | RestOrArray<APISelectMenuDefaultValue<SelectMenuDefaultValueType.Role> | APISelectMenuDefaultValue<SelectMenuDefaultValueType.User>> | No | The values to set |
Sets whether this select menu is disabled.
| Name | Type | Optional | Description |
|---|---|---|---|
| disabled | boolean | Yes | Whether this select menu is disabled |
Sets the id (not the custom id) for this component.
| Name | Type | Optional | Description |
|---|---|---|---|
| id | number | No | The id for this component |
Sets the maximum values that must be selected in the select menu.
| Name | Type | Optional | Description |
|---|---|---|---|
| maxValues | number | No | The maximum values that must be selected |
Sets the minimum values that must be selected in the select menu.
| Name | Type | Optional | Description |
|---|---|---|---|
| minValues | number | No | The minimum values that must be selected |
Sets the placeholder for this select menu.
| Name | Type | Optional | Description |
|---|---|---|---|
| placeholder | string | No | The placeholder to use |
Sets whether this select menu is required.
Remarks
Only for use in modals.| Name | Type | Optional | Description |
|---|---|---|---|
| required | boolean | Yes | Whether this select menu is required |
Serializes this builder to API-compatible JSON data.
Inherited from BaseSelectMenuBuilder