Skip to content

$getSelectMenuValues

$getSelectMenuValues returns the value of an option from select menu.

Usage

$getSelectMenuValues[index?;sep?]

Parameters

FieldTypeDescriptionRequired
index?string, numberThe option index from where the value will be fetched.
1. all - returns the value of all options.
2. any number (default 1)
false
sep?stringSeparator for returned values. (default ,)false

Example(s)

This will return the ID of all selected users from the option, delimited by comma (,):

1
client.command({
2
name: "select-menu",
3
code: `
4
Select a user.
5
$addSelectMenu[1;user;yourCustomID;This is a placeholder!;1;5;false]`
6
});
7
8
client.interactionCommand({
9
name: "yourCustomID",
10
prototype: "selectMenu",
11
code: `$interactionReply[$getSelectMenuValues[all;,]]`
12
});