Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Seniatical/dpy-paginator
A simple pagination library for Discord.py
https://github.com/Seniatical/dpy-paginator
discord discord-api discord-py discord-python pagination paginator
Last synced: about 1 month ago
JSON representation
A simple pagination library for Discord.py
- Host: GitHub
- URL: https://github.com/Seniatical/dpy-paginator
- Owner: Seniatical
- License: mit
- Created: 2023-04-19T20:30:15.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-04-20T15:27:21.000Z (over 1 year ago)
- Last Synced: 2024-08-21T03:01:35.122Z (5 months ago)
- Topics: discord, discord-api, discord-py, discord-python, pagination, paginator
- Language: Python
- Homepage:
- Size: 664 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-discordpy - Seniatical/dpy-paginator - A simple pagination library for discord.py, comes with support for dropdown, button based pagination. (Libraries and Extensions / UI - Pagination, Menus, Embeds and similar)
README
# Paginator
A pagination library for discord.py,
comes with support for dropdown, button based pagination## Installation
```py
pip install git+https://github.com/Seniatical/dpy-paginator/
```## Button Pagination
```py
from discord.ext.paginator import ButtonPaginatorpages = [
{'content': 'Page 1'},
{'content': 'Page 2'},
{'content': 'Page 3'}
]
paginator = ButtonPaginator(pages=pages)## In commands
await paginator.start(ctx=...)
```## Dropdown Pagination
```py
from discord.ext.paginator import DropdownPaginatorpages = [
('Page 1', {'content': 'Page 1'}),
('Page 2', {'content': 'Page 2'}),
('Page 3', {'content': 'Page 3'})
]
paginator = DropdownPaginator(pages=pages)## In commands
await paginator.start(ctx=...)
```