From 8f3224b70b6a89583d927c4ce2204bd94ed0b073 Mon Sep 17 00:00:00 2001 From: Devon R Date: Sat, 25 Feb 2023 06:24:50 +0900 Subject: [PATCH] [commands] Change Paginator.pages to not prematurely close --- discord/ext/commands/help.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/discord/ext/commands/help.py b/discord/ext/commands/help.py index 70fd36362..d8f341474 100644 --- a/discord/ext/commands/help.py +++ b/discord/ext/commands/help.py @@ -205,7 +205,12 @@ class Paginator: """List[:class:`str`]: Returns the rendered list of pages.""" # we have more than just the prefix in our current page 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 def __repr__(self) -> str: