Skip to content

Commit

Permalink
port LinePaginator and PaginationEmojis into the pagination module.
Browse files Browse the repository at this point in the history
This will allow their reusability in all other bots
  • Loading branch information
shtlrs committed Jan 4, 2024
1 parent 618d55e commit 43b720a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions pydis_core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from pydis_core import async_stats, exts, site_api, utils
from pydis_core._bot import BotBase, StartupError
from pydis_core.utils.pagination import EmptyPaginatorEmbedError, LinePaginator, PaginationEmojis

__all__ = [
async_stats,
Expand All @@ -10,6 +11,9 @@
utils,
site_api,
StartupError,
LinePaginator,
PaginationEmojis,
EmptyPaginatorEmbedError
]

__all__ = [module.__name__ for module in __all__]
4 changes: 4 additions & 0 deletions pydis_core/utils/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
interactions,
logging,
members,
messages,
pagination,
paste_service,
regex,
scheduling,
Expand Down Expand Up @@ -45,6 +47,8 @@ def apply_monkey_patches() -> None:
interactions,
logging,
members,
messages,
pagination,
paste_service,
regex,
scheduling,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ async def paginate(
>>> await LinePaginator.paginate(pagination_emojis, [line for line in lines], ctx, embed)
"""
paginator = cls(prefix=prefix, suffix=suffix, max_size=max_size,
max_lines=max_lines, scale_to_size=scale_to_size, pagination_emojis=pagination_emojis)
max_lines=max_lines, scale_to_size=scale_to_size)
current_page = 0

if not restrict_to_user:
Expand Down

0 comments on commit 43b720a

Please sign in to comment.