Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions interactions/ext/paginators.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ class Paginator:
"""Show a button which will call the `callback`"""
show_select_menu: bool = attrs.field(repr=False, default=False)
"""Should a select menu be shown for navigation"""
hide_buttons_on_stop: bool = attrs.field(repr=False, default=False)
"""Should the paginator buttons be hidden instead of disabled after stop or timeout"""

first_button_emoji: Optional[Union["PartialEmoji", dict, str]] = attrs.field(
repr=False, default="⏮️", metadata=export_converter(process_emoji)
Expand Down Expand Up @@ -270,6 +272,9 @@ def create_components(self, disable: bool = False) -> List[ActionRow]:
A list of ActionRows

"""
if disable and self.hide_buttons_on_stop:
return []

output = []

if self.show_select_menu:
Expand Down