Installation
Use the package manager pip to install the library.
pip install discord.py-pagination
Usage
Quickstart
import Paginator
embeds = [discord.Embed(title="First embed"),
discord.Embed(title="Second embed"),
discord.Embed(title="Third embed")]
...
await Paginator.Simple().start(ctx, pages=embeds)
Advanced
To use custom buttons, pass in the corresponding argument when you initiate the paginator.
PreviousButton = discord.ui.Button(...)
NextButton = discord.ui.Button(...)
PageCounterStyle = discord.ButtonStyle(...)
InitialPage = 0
timeout = 42069
await Paginator.Simple(
PreviousButton=PreviousButton,
NextButton=NextButton,
PageCounterStyle=PageCounterStyle,
InitialPage=InitialPage,
timeout=timeout).start(ctx, pages=embeds)
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
MIT