Dropdowns (Select Menus)

How to use dropdowns/select menus with Pycord

Docs: https://pycord.readthedocs.io/en/master/api.html?highlight=dropdown#discord.SelectMenu

Select menu attributes

Min Values: The Minimum number of values the user must select. A user can select multiple values in a select menu. If you want the user to be able to select only one option, set both min values and max values to 1.

Max Values: The Minimum number of values the user can select. A user can select multiple values in a select menu. If you want the user to be able to select only one option, set both min values and max values to 1.

Example of users being able to select multiple values

Placeholder: The text to be displayed when no option is selected.

Example of placeholder

Way 1: Subclassing discord.ui.View

Way 2: Sublcassing discord.ui.SelectMenu

Rows

A message can have up to five "action rows" and each of these "action" rows have five slots where you can put message components. A button takes up one of these slots but a select menus takes up all five slots of a "action row". Keep this in mind when creating your views since you don't want to run out of space!

Last updated

Was this helpful?