Skip to content

Commit 5c8790e

Browse files
authored
fix: πŸ› Only remove custom view item from paginator if it is in it (#3090)
* πŸ› Only remove custom view item from paginator if it is in it * πŸ“ CHANGELOG.md
1 parent 6683c68 commit 5c8790e

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

β€ŽCHANGELOG.mdβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ These changes are available on the `master` branch, but have not yet been releas
5252
fire. ([#3077](https://github.com/Pycord-Development/pycord/pull/3077))
5353
- Fixed an error when using methods from other classes regarding option autocompletes.
5454
([#3082](https://github.com/Pycord-Development/pycord/pull/3082))
55+
- Fixed `ext.pages.Paginator` not working anymore when using `custom_view`.
56+
([#3090](https://github.com/Pycord-Development/pycord/pull/3090))
5557

5658
### Removed
5759

β€Ždiscord/ext/pages/pagination.pyβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,8 @@ def update_custom_view(self, custom_view: discord.ui.View):
909909
"""Updates the custom view shown on the paginator."""
910910
if isinstance(self.custom_view, discord.ui.View):
911911
for item in self.custom_view.children:
912-
self.remove_item(item)
912+
if item in self.children:
913+
self.remove_item(item)
913914
for item in custom_view.children:
914915
self.add_item(item)
915916

0 commit comments

Comments
Β (0)