Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

README

        

# Paginator
A pagination library for discord.py,
comes with support for dropdown, button based pagination


Documentation

## Installation
```py
pip install git+https://github.com/Seniatical/dpy-paginator/
```

## Button Pagination
```py
from discord.ext.paginator import ButtonPaginator

pages = [
{'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 DropdownPaginator

pages = [
('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=...)
```