Components
editSelectMenu
$editSelectMenu
Modifies the properties of an existing select menu: placeholder text, minimum and maximum number of selectable values.
Syntax
$editSelectMenu[customId;placeholder;minValues;maxValues]
$editSelectMenu
The $editSelectMenu[] function modifies an existing select menu.
Syntax
$editSelectMenu[customId;placeholder;minValues;maxValues]
Parameters
| Parameter | Description |
|---|---|
customId |
The custom ID of the select menu to modify. |
placeholder |
Placeholder text displayed before selection. |
minValues |
Minimum number of required selections. |
maxValues |
Maximum number of allowed selections. |
Return value
None. The select menu is modified.
Behavior
- The targeted select menu must exist in the message.
minValuesmust be ≤maxValues.maxValuescannot exceed 25 (Discord limit).
Examples
Update after selection
$editSelectMenu[langMenu;Language chosen!;0;1]
Lock a select menu
$editSelectMenu[closedMenu;Closed;0;0]
Reset a dynamic select menu
$editSelectMenu[categoryMenu;Select a category;1;3]
Notes
- Use with
$editMessageto apply the modifications. - To modify the menu options, use
$editSelectMenuOption[]. maxValues=1creates a single-choice menu,>1a multi-choice menu.