Dropdowns (Select Menus)
How to use dropdowns/select menus with Pycord
This guide has been moved to https://namantech.me/pycord. Please visit the new guide instead, since this one might be outdated.
The new guide looks better, has better explanations, and is way better overall.
Docs: https://pycord.readthedocs.io/en/master/api.html?highlight=dropdown#discord.SelectMenu

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.

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

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?