mirror of
https://github.com/Rapptz/discord.py.git
synced 2025-07-11 20:35:26 +00:00
[commands] Change Paginator.pages to not prematurely close
This commit is contained in:
parent
3644f7849c
commit
8f3224b70b
@ -205,7 +205,12 @@ class Paginator:
|
|||||||
"""List[:class:`str`]: Returns the rendered list of pages."""
|
"""List[:class:`str`]: Returns the rendered list of pages."""
|
||||||
# we have more than just the prefix in our current page
|
# we have more than just the prefix in our current page
|
||||||
if len(self._current_page) > (0 if self.prefix is None else 1):
|
if len(self._current_page) > (0 if self.prefix is None else 1):
|
||||||
self.close_page()
|
# Render and include current page without closing
|
||||||
|
current_page = self.linesep.join(
|
||||||
|
[*self._current_page, self.suffix] if self.suffix is not None else self._current_page
|
||||||
|
)
|
||||||
|
return [*self._pages, current_page]
|
||||||
|
|
||||||
return self._pages
|
return self._pages
|
||||||
|
|
||||||
def __repr__(self) -> str:
|
def __repr__(self) -> str:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user