Creates a Menu with options.
to construct a menu inside $selectMenu, it needs to follow this structure
{id=menu id}
{placeholder/ph=A placeholder for the menu}
{min=minimum options to be selected (i.e 1)}
{max=maximum options to be selected (i.e 5)}
{type=the menu type (i.e text/user/role/mention/channel)}
// Each option can be structured like this
{option=Option name}
{value=option id}
{desc=description of the option (optional)}
{emoji=an emoji of the option (optional)}
typethe menu type, can betext(default),user(to select a user),role(role select),mention(role or user select),channel(channel select)idthe id of menu must be unique on multiple menusplaceholderminminimum to select (optional)maxmaximum to select (optional)optionlabel of optiondescdescription of optionvalueid of option ,which $eventSelected returns when the user selects the optionemojiemoji for option (optional)
Info:
- You can have up to 5 menu in a message
- You can add maximal 20 options for each menu
$selectMenu[
{id=my_menu}
{ph=Select the option}
{type=text}
{min=1}
{max=2}
{option=Option 1}
{value=option_1}
{option=Option 2}
{value=option_2}
{option=Option 3}
{value=option_3}
]
$selectMenu[
{id=my_menu}
{ph=Select the option}
{type=text}
{min=1}
{max=2}
{option=Option 1}
{value=option_1}
{option=Option 2}
{value=option_2}
{option=Option 3}
{value=option_3}
{selected=option_1}
{selected=option_3}
]
$selectMenu[
{id=my_menu}
{ph=Select the user}
{type=user}
{min=1}
{max=2}
]
$sendMessage[
{menu:
{id=my_menu}
{ph=Select the user}
{type=user}
{min=1}
{max=2}
}
]
$selectMenu[
{id=my_menu}
{ph=Select the user}
{type=user}
{min=1}
{max=2}
{selected_user=$userID}
]
$selectMenu[
{id=my_menu}
{ph=Select the role}
{type=role}
{min=1}
{max=2}
{selected_role=$roleID[Test1]}
]
$selectMenu[
{id=my_menu}
{ph=Select the channel}
{type=channel}
{min=1}
{max=2}
{selected_channel=$channelID}
]
$selectMenu[
{id=my_menu}
{ph=Select user or role}
{type=mention}
{min=1}
{max=2}
{selected_role=$roleID[Test1]}
{selected_user=$userID}
]
::: tip {key=value} what is this for a syntax?
This syntax is called curl args.It is really similar to curl message.Especially new Functions support it ,you can use !!func function name to check if it supports curl arguments.
Learn more
:::
::: tip Do you want to add a menu inside a Function as a parameter, like $sendMessage[text]?
Use:
{menu:
{id=id}
{placeholder=Pls select your answer!}
{min=1}
{max=2}
{option=Option one }
{desc=txt for one}
{value=one}
{emoji=$customEmoji[accept]}
}
:::
::: danger Please be aware!!
If you add any : in this function it will error! Check out this
Link escapes are needed, use \ to escape characters. Read me to see more
:::
::: tip Using the menu as trigger check here to learn more. :::







