File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -65,13 +65,10 @@ async def change_source(self, source: PageSource):
6565 await self .show_page (0 )
6666
6767 def should_add_reactions (self ) -> bool :
68- return self .should_add_reactions_or_buttons ()
68+ return super (). should_add_reactions () and self ._source . is_paginating ()
6969
7070 def should_add_buttons (self ) -> bool :
71- return self .should_add_reactions_or_buttons ()
72-
73- def should_add_reactions_or_buttons (self ) -> bool :
74- return self ._source .is_paginating ()
71+ return super ().should_add_buttons () and self ._source .is_paginating ()
7572
7673 async def _get_kwargs_from_page (self , page : List [Any ]) -> SendKwargsType :
7774 """|coro|
@@ -324,6 +321,9 @@ def __init__(
324321 # disable buttons that are not available
325322 self ._disable_unavailable_buttons ()
326323
324+ def should_add_buttons (self ) -> bool :
325+ return self ._source .is_paginating ()
326+
327327 async def show_page (self , page_number : int ):
328328 """|coro|
329329 Sets the current page to the specified page and shows it.
You can’t perform that action at this time.
0 commit comments