Skip to content

Commit fecf3d3

Browse files
authored
feat: option to hide paginator buttons on stop (#1660)
1 parent 2f570a2 commit fecf3d3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

interactions/ext/paginators.py

+5
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ class Paginator:
106106
"""Show a button which will call the `callback`"""
107107
show_select_menu: bool = attrs.field(repr=False, default=False)
108108
"""Should a select menu be shown for navigation"""
109+
hide_buttons_on_stop: bool = attrs.field(repr=False, default=False)
110+
"""Should the paginator buttons be hidden instead of disabled after stop or timeout"""
109111

110112
first_button_emoji: Optional[Union["PartialEmoji", dict, str]] = attrs.field(
111113
repr=False, default="⏮️", metadata=export_converter(process_emoji)
@@ -270,6 +272,9 @@ def create_components(self, disable: bool = False) -> List[ActionRow]:
270272
A list of ActionRows
271273
272274
"""
275+
if disable and self.hide_buttons_on_stop:
276+
return []
277+
273278
output = []
274279

275280
if self.show_select_menu:

0 commit comments

Comments
 (0)