Dropdown Menu #406
-
I've tried the dropdown menu, and I just started coding python 4 months ago 😅 how do I use the dropdown menu for adding roles? I got the dropdown menu to work when I copied from the example file, but I don't know how to utilize it to add roles. I know what section I need to change, but I'm not entirely sure what I will be doing with the new code that I have to put in for the roles to work. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 4 replies
-
If you want to add roles when someone selects an item in your select menu, in your callback check which item(s) they have selected with |
Beta Was this translation helpful? Give feedback.
If you want to add roles when someone selects an item in your select menu, in your callback check which item(s) they have selected with
select.values
orself.values
if you are subclassingdiscord.ui.Select
. Then you can add a role tointeraction.user
(the person who selected the item) by checking what they selected.