Represents an option within a string select menu component
Implements
JSONEncodable<APISelectMenuOption>Creates a new string select menu option from API data
Example
Creating a string select menu option from an API data objectExample
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 of this option
| Name | Type | Optional | Description |
|---|---|---|---|
| description | string | No | The description of this option |
Sets the emoji to display on this option
| Name | Type | Optional | Description |
|---|---|---|---|
| emoji | APIMessageComponentEmoji | No | The emoji to display on this option |
Sets the label of this option
| Name | Type | Optional | Description |
|---|---|---|---|
| label | string | No | The label to show on this option |
Sets the value of this option
| Name | Type | Optional | Description |
|---|---|---|---|
| value | string | No | The value of this option |
Serializes this component to an API-compatible JSON object