Skip to content

Commit 5ae9569

Browse files
authored
Merge pull request #598 from plun1331/patch-6
`ext.pages` Documentation Fixes
2 parents 1d65214 + 8c9bada commit 5ae9569

File tree

2 files changed

+18
-16
lines changed

2 files changed

+18
-16
lines changed

discord/ext/pages/pagination.py

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,6 @@ async def callback(self, interaction: discord.Interaction):
6565
class Paginator(discord.ui.View):
6666
"""Creates a paginator which can be sent as a message and uses buttons for navigation.
6767
68-
Attributes
69-
----------
70-
current_page: :class:`int`
71-
A zero-indexed value showing the current page number.
72-
page_count: :class:`int`
73-
A zero-indexed value showing the total number of pages.
74-
buttons: Dict[:class:`str`, Dict[:class:`str`, Union[:class:`~PaginatorButton`, :class:`bool`]]]
75-
A dictionary containing the :class:`~PaginatorButton` objects included in this paginator.
76-
user: Optional[Union[:class:`~discord.User`, :class:`~discord.Member`]]
77-
The user or member that invoked the paginator.
78-
message: Union[:class:`~discord.Message`, :class:`~discord.WebhookMessage`]
79-
The message the paginator is attached to.
80-
8168
Parameters
8269
----------
8370
pages: Union[List[:class:`str`], List[:class:`discord.Embed`]]
@@ -89,9 +76,24 @@ class Paginator(discord.ui.View):
8976
author_check: :class:`bool`
9077
Whether only the original user of the command can change pages.
9178
disable_on_timeout: :class:`bool`
92-
Whether the buttons get disabled when the pagintator view times out.
79+
Whether the buttons get disabled when the paginator view times out.
9380
custom_view: Optional[:class:`discord.ui.View`]
9481
A custom view whose items are appended below the pagination buttons.
82+
timeout: Optional[:class:`float`]
83+
Timeout in seconds from last interaction with the paginator before no longer accepting input.
84+
85+
Attributes
86+
----------
87+
current_page: :class:`int`
88+
A zero-indexed value showing the current page number.
89+
page_count: :class:`int`
90+
A zero-indexed value showing the total number of pages.
91+
buttons: Dict[:class:`str`, Dict[:class:`str`, Union[:class:`~PaginatorButton`, :class:`bool`]]]
92+
A dictionary containing the :class:`~PaginatorButton` objects included in this paginator.
93+
user: Optional[Union[:class:`~discord.User`, :class:`~discord.Member`]]
94+
The user or member that invoked the paginator.
95+
message: Union[:class:`~discord.Message`, :class:`~discord.WebhookMessage`]
96+
The message the paginator is attached to.
9597
"""
9698

9799
def __init__(
@@ -187,7 +189,7 @@ async def goto_page(self, interaction: discord.Interaction, page_number=0) -> No
187189
Parameters
188190
----------
189191
interaction: :class:`discord.Interaction`
190-
The interaction which called the Paginator
192+
The interaction that invoked the paginator.
191193
page_number: :class:`int`
192194
The page to display.
193195

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@
163163
'discord_extensions': [
164164
('discord.ext.commands', 'ext/commands'),
165165
('discord.ext.tasks', 'ext/tasks'),
166-
('discord.ext.menus', 'ext/menus'),
166+
('discord.ext.pages', 'ext/pages'),
167167
],
168168
}
169169

0 commit comments

Comments
 (0)