scarletcafe / jishaku

A debugging and testing cog for discord.py rewrite bots.
https://jishaku.readthedocs.io/en/latest/
MIT License
541 stars 181 forks source link

Added raw_reaction_remove in paginator. #91

Closed Cryptex-github closed 3 years ago

Cryptex-github commented 3 years ago

Added reaction_remove in paginator so you don't have to click twice to go the next page.

Rationale

The reason behind this change is because I find it is annoying to click twice to go to the next page I believe it will benefit to users because I do believe most people don't like to click twice to go to the next page.

Summary of changes made

I used asyncio.ensure_future and asyncio.wait to wait for either event to be fired.

Checklist

scarletcafe commented 3 years ago

I get the practicality rationale of this change, but I am worried it may be confusing.

At the very least, I would still prefer that the bot removes reactions itself if it can do so. To keep compatibility with this change in such a case, the check would need to be adjusted to ensure the bot ignores its own reaction removals in the case that the bot's permissions change while an interface is open (or maybe just to ignore bots outright - I am not sure why it doesn't do this already).

scarletcafe commented 3 years ago

Over the course of the last couple of commits, I've redesigned the update and event retrieval mechanics of PaginatorInterface. This takes this design change into account.

I wanted to get the bot removing the reaction itself if possible, but it turns out such events do not give any information to suggest the reaction wasn't removed by the user themselves. I guess one thing I could do is check channel permissions and change between the two behaviors based on whether the bot can or not, but I'd prefer to stay consistent so I'll leave it as is with removals considered and change it if I get complaints later.