Paginators#
Paginator
#
__init__(author, embeds, commands_list=None, pg_type=PgTypes.first, *, buttons=None, menus=None, append_before=False, footer=None, timeout=DEFAULT_TIMEOUT)
#
Paginator is used to show users the given embeds in pages format using navigation Buttons and DropMenus
Custom IDs for Buttons:#
home, forward, backward, skip_Tofirst, skip_Tolast, delete
Custom IDs for Menu:#
commands-list, cmds-list
Note: These ID's can be used to modify the buttons/menus in the Paginator
Parameters:
Name | Type | Description | Default |
---|---|---|---|
author |
discord.Member
|
User who will interact with the Paginator |
required |
embeds |
List[discord.Embed]
|
The list of embeds that acts as Pages |
required |
commands_list |
List[SOption]
|
The list of options which are shown as options in a Drop Menu |
None
|
pg_type |
PgTypes
|
Takes the PgTypes |
PgTypes.first
|
buttons |
List[SButton]
|
List of buttons used to navigate of interact with the pages/embeds |
None
|
menus |
List[SDropMenu]
|
List of Menus used to make a user select options from it |
None
|
append_before |
bool
|
If true, buttons & menus will be added before default buttons & menus in Paginator and vice-versa |
False
|
footer |
str
|
Used to add content into text in footer of discord.Embed |
None
|
timeout |
Optional[Union[int, float]]
|
Timeout of the interaction |
DEFAULT_TIMEOUT
|
view()
#
Returns:
Name | Type | Description |
---|---|---|
view |
ui.View
|
discord.ui.View |
PgTypes
#
SOption(*, name, embed, description=None, emoji=None)
#
It's a decorator used to overwrite options in discord.ui.Select
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
label for option |
required |
embed |
discord.Embed
|
If option is selected, the embed will be sent ! |
required |
description |
str
|
Description for the option |
None
|
emoji |
Union[str, discord.Emoji, discord.PartialEmoji]
|
Emoji for the option |
None
|
Returns:
Name | Type | Description |
---|---|---|
decorator |
Dict
|
Dictionary of options |