should_add_reactions is returning true for MenuPages when there are no reactions. This makes it check for reactions permissions when it does not need to.
Solution:
MenuPages.should_add_reactions_or_buttons() now uses the implementation of Menu by returning self.should_add_reactions() or self.should_add_buttons().
MenuPages.should_add_reactions() and MenuPages.should_add_buttons() now call their respective super() implementations in addition to checking if paginating.
In ButtonMenuPages, should_add_buttons() is overridden to only check if the source is paginating since buttons are added in the constructor and should_add_buttons() is checked in the constructor before the buttons are added.
Problem:
should_add_reactions
is returning true forMenuPages
when there are no reactions. This makes it check for reactions permissions when it does not need to.Solution:
MenuPages.should_add_reactions_or_buttons()
now uses the implementation ofMenu
by returningself.should_add_reactions() or self.should_add_buttons()
.MenuPages.should_add_reactions()
andMenuPages.should_add_buttons()
now call their respective super() implementations in addition to checking if paginating.ButtonMenuPages
,should_add_buttons()
is overridden to only check if the source is paginating since buttons are added in the constructor andshould_add_buttons()
is checked in the constructor before the buttons are added.