Skip to main content

Select Menus

A select menu is a dropdown. It fits more choices into a message than buttons can, and Discord will fill some kinds of menu in for you.

Show the whole Select Menus flyout

The Select Menus subcategory

Every menu goes inside its own interactive row. A row that holds a menu cannot hold anything else.

Text menus​

Add a menu

The menu you write the options for yourself.

FieldWhat it is
PlaceholderThe grayed-out text shown before anything is selected.
IDThe custom ID, used to recognize the menu in the event.
DisabledWhen true, the menu cannot be opened.
OptionsThe add an option blocks.

Add an option

FieldWhat it is
LabelWhat the user sees.
DescriptionA smaller second line under the label.
EmojiAn optional emoji beside the label.
Selected by defaultWhether it starts selected.
ValueWhat your code receives. Not shown to the user.

A menu holds up to 25 options.

The other four menus populate themselves from the server, so you never have to build the list.

BlockWhat it offers
channel menuEvery channel. Restrict the kinds with channel type blocks.
role menuEvery role.
user menuEvery member.
mentionable menuMembers and roles together.

Each takes a list of IDs to pre-select, which is how you show a settings menu with the current choice already highlighted.

Channel type

channel type restricts a channel menu. Put several in a list to allow several kinds.

Responding to a selection​

When a menu is clicked

when a menu is clicked fires for every menu on your bot, so check which one first.

BlockReturns
menu idThe custom ID of the menu that was used.
menu valueWhat was selected. Text for a text menu, and the actual channel, role or user for the others.
memberThe member who used the menu.
userThe user who used it.
channelThe channel it happened in.
serverThe server it happened in.
tip

the value of the selected option returns a real Discord object for channel, role, user and mentionable menus. You can plug it straight into a block that expects a channel or a role, with no lookup needed.

Replying​

The same three blocks as buttons: reply to the interaction, defer reply for slow work, and edit the bot's reply afterwards.

Update the original message

update the original message is different, and it is often what you want. Instead of sending a new reply, it rewrites the message the menu is on. Use it for a settings panel that should show the new state, or a paged list that should move to the next page in place.

Delete reply

delete the reply by the bot removes the reply.

A worked example: a role picker​

  1. Send a message with a role menu, ID pick_role, placeholder "Choose your roles".
  2. In when a menu is clicked, check the ID.
  3. the value of the selected option gives you the role directly.
  4. Use add role to member from Roles, with member of the interaction.
  5. Reply, visible only to the user, confirming which role they got.