Closed ioistired closed 4 years ago
if self.__tasks:
Could just while self.__tasks:
to loop through + pop them + cancel the popped values
if self.__tasks:
Could just
while self.__tasks:
to loop through + pop them + cancel the popped values
The whole if
statement seems superfluous, as the body alone would achieve the same thing. The only thing it changes is clear()
being called on an empty list, which is only nanoseconds slower than the conditional in the first place.
Resolved in latest force push.
This commit fixes a bug where, given a menu with clear_reactions_after=True, stopping the paginator before the rest of the reactions are added causes them to be added anyway.
Now, the adding of reactions is moved into a task, and cancelled when the menu is stopped.