DiscordGIR / Bloo

The best Discord bot, created for r/Jailbreak
MIT License
36 stars 10 forks source link

suggestion: use select menu's for choose a role #12

Closed WilsontheWolf closed 2 years ago

WilsontheWolf commented 2 years ago

For the select a role, I belive a select menu would look alot cleaner. Here is an example of how they look.

They have the same fields as buttons (title and emoji) but are all in a list. One select menu can also have a total of 25 values, which means all roles can fit in one select menu. You could also allow users selecting multiple at a time and add them all at once if you wanted to.

See the docs here: https://discord.com/developers/docs/interactions/message-components#select-menus

SlimShadyIAm commented 2 years ago

Thanks for the suggestion. I did actually try to implement something like this but I wasn't happy with how it turned out. It was super unintuitive.

The main problem is that there is no way for users to know what they already selected the last time they used the menu because when Discord restarts or you change channels, all the values you selected get cleared out. And you can't tell the API to "preselct this value if condition x is met" either.

So the way I would have implemented something like this is: when a user selects some items, add the roles for the values they selected and remove the ones that aren't. But then if you do it this way, if you have all 25 roles and you want to remove just one, you need to select all 24 options to keep the other ones.

Another way would be to either add or remove the roles you select depending on whether you already have it or not but that doesn't make sense to me either -- select should be "add" and unselect should be "remove". And it becomes weird and confusing when you can select multiple at the same time.

So in conclusion I think that buttons are really the best way to go with something like this because you get immediate feedback when you click the button. Select menus seem nice if the user interacts with it once and only once but beyond that it's dicey. If you think you know of a way around these issues let me know!