diff --git a/discord/ext/pages/pagination.py b/discord/ext/pages/pagination.py index 14b584e3fc..9f06e1ccb9 100644 --- a/discord/ext/pages/pagination.py +++ b/discord/ext/pages/pagination.py @@ -65,19 +65,6 @@ async def callback(self, interaction: discord.Interaction): class Paginator(discord.ui.View): """Creates a paginator which can be sent as a message and uses buttons for navigation. - Attributes - ---------- - current_page: :class:`int` - A zero-indexed value showing the current page number. - page_count: :class:`int` - A zero-indexed value showing the total number of pages. - buttons: Dict[:class:`str`, Dict[:class:`str`, Union[:class:`~PaginatorButton`, :class:`bool`]]] - A dictionary containing the :class:`~PaginatorButton` objects included in this paginator. - user: Optional[Union[:class:`~discord.User`, :class:`~discord.Member`]] - The user or member that invoked the paginator. - message: Union[:class:`~discord.Message`, :class:`~discord.WebhookMessage`] - The message the paginator is attached to. - Parameters ---------- pages: Union[List[:class:`str`], List[:class:`discord.Embed`]] @@ -89,9 +76,24 @@ class Paginator(discord.ui.View): author_check: :class:`bool` Whether only the original user of the command can change pages. disable_on_timeout: :class:`bool` - Whether the buttons get disabled when the pagintator view times out. + Whether the buttons get disabled when the paginator view times out. custom_view: Optional[:class:`discord.ui.View`] A custom view whose items are appended below the pagination buttons. + timeout: Optional[:class:`float`] + Timeout in seconds from last interaction with the paginator before no longer accepting input. + + Attributes + ---------- + current_page: :class:`int` + A zero-indexed value showing the current page number. + page_count: :class:`int` + A zero-indexed value showing the total number of pages. + buttons: Dict[:class:`str`, Dict[:class:`str`, Union[:class:`~PaginatorButton`, :class:`bool`]]] + A dictionary containing the :class:`~PaginatorButton` objects included in this paginator. + user: Optional[Union[:class:`~discord.User`, :class:`~discord.Member`]] + The user or member that invoked the paginator. + message: Union[:class:`~discord.Message`, :class:`~discord.WebhookMessage`] + The message the paginator is attached to. """ def __init__( @@ -187,7 +189,7 @@ async def goto_page(self, interaction: discord.Interaction, page_number=0) -> No Parameters ---------- interaction: :class:`discord.Interaction` - The interaction which called the Paginator + The interaction that invoked the paginator. page_number: :class:`int` The page to display. diff --git a/docs/conf.py b/docs/conf.py index f02bf278d5..f378744c56 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -163,7 +163,7 @@ 'discord_extensions': [ ('discord.ext.commands', 'ext/commands'), ('discord.ext.tasks', 'ext/tasks'), - ('discord.ext.menus', 'ext/menus'), + ('discord.ext.pages', 'ext/pages'), ], }