File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -273,6 +273,7 @@ def __init__(
273
273
self .default_button_row = default_button_row
274
274
self .loop_pages = loop_pages
275
275
self .custom_view = custom_view
276
+ self .custom_view_items = []
276
277
self .message : Union [discord .Message , discord .WebhookMessage , None ] = None
277
278
278
279
if self .custom_buttons and not self .use_default_buttons :
@@ -382,7 +383,7 @@ async def on_timeout(self) -> None:
382
383
async def disable (self ) -> None :
383
384
"""Stops the paginator, disabling all of its components. Does not disable components added via custom views."""
384
385
for item in self .children :
385
- if isinstance ( item , ( PaginatorButton , PaginatorMenu )) :
386
+ if item not in self . custom_view_items :
386
387
item .disabled = True
387
388
await self .message .edit (view = self )
388
389
@@ -565,6 +566,7 @@ def update_buttons(self) -> Dict:
565
566
# The bot developer should handle row assignments for their view before passing it to Paginator
566
567
if self .custom_view :
567
568
for item in self .custom_view .children :
569
+ self .custom_view_items .append (item )
568
570
self .add_item (item )
569
571
570
572
return self .buttons
You can’t perform that action at this time.
0 commit comments