Types¶
Types used internally by the paginator. Nothing really interesting here other than the Page typevar indicating the supported page types.
- class discord.ext.paginators._types.BaseKwargs[source]¶
- attachments: NotRequired[list[discord.File]]¶
Attachments of the page. Not always available, probably only when using edit.
- Type:
NotRequired[List[Union[
discord.File,discord.Attachment]]]
- embeds: list[discord.Embed]¶
Embeds of the page.
- Type:
List[
discord.Embed]
- files: NotRequired[list[Union[discord.File, discord.Attachment]]]¶
Files of the page. Not always available like when using edit.
- Type:
NotRequired[List[
discord.File]]
- view: discord.ui.View¶
View of the page. (the paginator)
- class discord.ext.paginators._types.BasePaginatorKwargs[source]¶
- add_page_string: NotRequired[bool]¶
Whether to add the page string to the page. Defaults to
True. This is a string that represents the current page and the max pages. E.g.:"Page 1 of 2".If the page is an embed, it will be appended to the footer text. If the page is a string, it will be appended to the string. Else, it will be set as the content of the message.
- always_allow_bot_owner: NotRequired[bool]¶
Whether to always allow the bot owner to interact with the paginator. Defaults to
True.
- author_id: NotRequired[Optional[int]]¶
The id of the user who can interact with the paginator. Defaults to
None.
- check: NotRequired[Optional[PaginatorCheck[PaginatorT]]]¶
A callable that checks if the interaction is valid. This must be a callable that takes 2 or 3 parameters. The last two parameters represent the interaction and paginator respectively. It CAN be a coroutine.
This is called in
interaction_check().If
author_idis notNone, this won’t be called. Defaults toNone.
- clear_buttons_after: NotRequired[bool]¶
Whether to clear the buttons after the paginator stops. Only works if
messageis notNone. Defaults toFalse.
- delete_after: NotRequired[bool]¶
Whether to delete the message after the paginator stops. Only works if
messageis notNone. Defaults toFalse.
- disable_after: NotRequired[bool]¶
Whether to disable the paginator after the paginator stops. Only works if
messageis notNone. Defaults toFalse.
- message: NotRequired[Optional[discord.Message]]¶
The message to use for the paginator. This is set automatically when
_sendis called. Defaults toNone.
- per_page: NotRequired[int]¶
The amount of pages to display per page. Defaults to
1.E.g.: If
per_pageis2andpagesis["1", "2", "3", "4"], then the message will show["1", "2"]on the first page and["3", "4"]on the second page.
- timeout: NotRequired[Optional[Union[int, float]]]¶
The timeout for the paginator. Defaults to
180.0.