A builder that creates API-compatible JSON data for string select menu options.
Implements
JSONEncodable<APISelectMenuOption>Creates a new string select menu option from API data.
Example
Creating a string select menu option from an API data object:Example
Creating a string select menu option using setters and API data:Name | Type | Optional | Description |
---|---|---|---|
data | Partial<APISelectMenuOption> | Yes | The API data to create this string select menu option with |
Sets whether this option is selected by default.
Name | Type | Optional | Description |
---|---|---|---|
isDefault | boolean | Yes | Whether this option is selected by default |
Sets the description for this option.
Name | Type | Optional | Description |
---|---|---|---|
description | string | No | The description to use |
Sets the emoji to display for this option.
Name | Type | Optional | Description |
---|---|---|---|
emoji | APIMessageComponentEmoji | No | The emoji to use |
Sets the label for this option.
Name | Type | Optional | Description |
---|---|---|---|
label | string | No | The label to use |
Sets the value for this option.
Name | Type | Optional | Description |
---|---|---|---|
value | string | No | The value to use |
Serializes this builder to API-compatible JSON data.