aboutsummaryrefslogtreecommitdiffstats
path: root/bot/utils/pagination.py
diff options
context:
space:
mode:
authorGravatar SomeHybrid <[email protected]>2023-08-27 19:51:22 +0700
committerGravatar GitHub <[email protected]>2023-08-27 19:51:22 +0700
commitbda41cb204c3303a74ab199448d391120155286b (patch)
treeb8b5bb0ff6cd21303928b74d81b986281a74784d /bot/utils/pagination.py
parentChanged cooldown to 5s, removed description if abstract not found (diff)
parentholidayreact: add alternate spellings to February (#1214) (diff)
Merge branch 'python-discord:main' into main
Diffstat (limited to 'bot/utils/pagination.py')
-rw-r--r--bot/utils/pagination.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/bot/utils/pagination.py b/bot/utils/pagination.py
index ef3186d0..58115fd6 100644
--- a/bot/utils/pagination.py
+++ b/bot/utils/pagination.py
@@ -90,8 +90,8 @@ class LinePaginator(Paginator):
cls, lines: Iterable[str], ctx: Context,
embed: Embed, prefix: str = "", suffix: str = "",
max_lines: int | None = None, max_size: int = 500, empty: bool = True,
- restrict_to_user: User = None, timeout: int = 300, footer_text: str = None,
- url: str = None, exception_on_empty_embed: bool = False
+ restrict_to_user: User = None, timeout: float = 300, footer_text: str | None = None,
+ url: str | None = None, exception_on_empty_embed: bool = False
) -> None:
"""
Use a paginator and set of reactions to provide pagination over a set of lines.
@@ -302,13 +302,13 @@ class ImagePaginator(Paginator):
self._current_page.append(line)
self.close_page()
- def add_image(self, image: str = None) -> None:
+ def add_image(self, image: str | None = None) -> None:
"""Adds an image to a page given the url."""
self.images.append(image)
@classmethod
async def paginate(cls, pages: list[tuple[str, str]], ctx: Context, embed: Embed,
- prefix: str = "", suffix: str = "", timeout: int = 300,
+ prefix: str = "", suffix: str = "", timeout: float = 300,
exception_on_empty_embed: bool = False) -> None:
"""
Use a paginator and set of reactions to provide pagination over a set of title/image pairs.