Skip to content

Commit e2feaff

Browse files
committed
include pagination_emojis in the paginate class method
1 parent 5d38be1 commit e2feaff

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pydis_core/utils/paginator.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,6 @@ def _new_page(self) -> None:
138138
self._count = len(self.prefix) + 1
139139
self.close_page()
140140

141-
142141
def _split_remaining_words(self, line: str, max_chars: int) -> tuple[str, str | None]:
143142
"""
144143
Internal: split a line into two strings -- reduced_words and remaining_words.
@@ -185,6 +184,7 @@ def _split_remaining_words(self, line: str, max_chars: int) -> tuple[str, str |
185184
@classmethod
186185
async def paginate(
187186
cls,
187+
pagination_emojis: _PaginationEmojis,
188188
lines: list[str],
189189
ctx: Context | discord.Interaction,
190190
embed: discord.Embed,
@@ -200,7 +200,7 @@ async def paginate(
200200
url: str | None = None,
201201
exception_on_empty_embed: bool = False,
202202
reply: bool = False,
203-
allowed_roles: Sequence[int] | None = None
203+
allowed_roles: Sequence[int] | None = None,
204204
) -> discord.Message | None:
205205
"""
206206
Use a paginator and set of reactions to provide pagination over a set of lines.
@@ -218,10 +218,10 @@ async def paginate(
218218
Example:
219219
>>> embed = discord.Embed()
220220
>>> embed.set_author(name="Some Operation", url=url, icon_url=icon)
221-
>>> await LinePaginator.paginate([line for line in lines], ctx, embed)
221+
>>> await LinePaginator.paginate(pagination_emojis, [line for line in lines], ctx, embed)
222222
"""
223-
paginator = cls(prefix=prefix, suffix=suffix, max_size=max_size, max_lines=max_lines,
224-
scale_to_size=scale_to_size)
223+
paginator = cls(prefix=prefix, suffix=suffix, max_size=max_size,
224+
max_lines=max_lines, scale_to_size=scale_to_size, pagination_emojis=pagination_emojis)
225225
current_page = 0
226226

227227
if not restrict_to_user:

0 commit comments

Comments
 (0)