MessageSelectMenu
classe · Source
Represents a select menu message component
Extends: BaseMessageComponent
Constructor
Parameters
| Name | Type | Description |
|---|---|---|
data? | MessageSelectMenu | MessageSelectMenuOptions | MessageSelectMenu to clone or raw data Default: {}. |
Properties
customId
nullable
A unique string to be sent in the interaction when clicked Source
placeholder
nullable
Custom placeholder text to display when nothing is selected Source
minValues
nullable
The minimum number of selections required Source
maxValues
nullable
The maximum number of selections allowed Source
options
Options for the STRING_SELECT menu Source
disabled
Whether this select menu is currently disabled Source
channelTypes
Channels that are possible to select in CHANNEL_SELECT menu Source
type
nullable
The type of this component Source
data
The data for this component Source
id
readonly
The id of this component Source
Methods
toJSON
Transforms the select menu into a plain object Returns: APIMessageSelectMenu — The raw data of this select menu Source
normalizeOption
static
Normalizes option input and resolves strings and emojis. Parameters
| Name | Type | Description |
|---|---|---|
option | MessageSelectOptionData | The select menu option to normalize |
Returns: MessageSelectOptionSource
normalizeOptions
static
Normalizes option input and resolves strings and emojis. Parameters
| Name | Type | Description |
|---|---|---|
options | MessageSelectOptionData | Array<MessageSelectOptionData> | The select menu options to normalize |
Returns: Array<MessageSelectOption>Source