Closed CircuitSacul closed 3 years ago
Similar pull requests to this have been denied see https://github.com/Rapptz/discord-ext-menus/pull/19#issuecomment-698574075 and https://github.com/Rapptz/discord-ext-menus/pull/35#issuecomment-806237803 for the rationale behind not supporting it
If I'm understanding this correct, the concern is that when the bot removes the reaction the raw_reaction_remove
is called and causes the paginator to skip. With the way I implemented this, the bot only listens to the raw_reaction_add
event if this setting is enabled, therefore preventing any risk.
Right now, the only way to do this would be to completely overwrite the _internal_loop
function in my menu, which is a rather long function and something I would prefer not to do.
Also on the second comment, I see why it might be considered bad design, but I want to have this option. It defaults to False anyways.
Since you didn't bother to read the comment at all I've copied it here for you
Ultimately the current code offers a consistent UX -- 1 click or tap and the button works. With the PR then this stuff will always take two clicks (bad UX) and if there's auto removal in the user code somewhere then there's going to be an extra HTTP request that might work or not leading it to require 2 clicks for the user anyway.
I'm just not a fan and would rather not offer library users a footgun like this.
Since you didn't bother to read the comment at all I've copied it here for you
- It doesn't work in DMs, since you can only remove your own reaction and not the other person. So they have to click twice anyway in that case.
- It doesn't work if you don't have permissions. In this case you have to click twice again.
- If you remove it then it causes an extra HTTP request for the removal if it even works. This route is heavily rate limited so having extra requests for this is undesirable.
Ultimately the current code offers a consistent UX -- 1 click or tap and the button works. With the PR then this stuff will always take two clicks (bad UX) and if there's auto removal in the user code somewhere then there's going to be an extra HTTP request that might work or not leading it to require 2 clicks for the user anyway.
I'm just not a fan and would rather not offer library users a footgun like this.
Actually I did read it, and I responded
Essentially, this allows the
Menu
to function the way 99% of other paginators work, where the user reaction to one of the buttons, and the bot automatically removes it, instead of listening for both theadd
andremove
events.It's simply another option, that when enabled, means the bot will only listen to the
add
event and will try to remove the reaction. I intentionally passed thediscord.Forbidden
error and didn't add to the menu permission checks, because if the bot doesn't have permission to remove reactions I want it to keep working and not demand those perms.Also, thanks so much for making this -- it makes working with reaction menus way more than a "little" easier :)