Easily create pagination for your embeds.
Project description
discord.py-pagination
discord.py-pagination is a Python library to easily create embed paginators.
Installation
Use the package manager pip to install the library.
pip install discord.py-pagination
Usage
Quickstart
import Paginator
# Create a list of embeds to paginate.
embeds = [discord.Embed(title="First embed"),
discord.Embed(title="Second embed"),
discord.Embed(title="Third embed")]
... # Inside a command.
await Paginator.Simple().start(ctx, pages=embeds)
Advanced
To use custom buttons, pass in the corresponding argument when you initiate the paginator. THESE ARE OPTIONAL
# These arguments override the default ones.
PreviousButton = discord.ui.Button(...)
NextButton = discord.ui.Button(...)
PageCounterStyle = discord.ButtonStyle(...) # Only accepts ButtonStyle instead of Button
InitialPage = 0 # Page to start the paginator on.
timeout = 42069 # Seconds to timeout. Default is 60
ephemeral = true # Defaults to false if not passed in.
await Paginator.Simple(
PreviousButton=PreviousButton,
NextButton=NextButton,
PageCounterStyle=PageCounterStyle,
InitialPage=InitialPage,
timeout=timeout, ephemeral=ephemeral).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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file Markinator-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: Markinator-0.0.6-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec1ab4bd84c2f4bbbc4510cce298f14f0828fd39dc4854d42d9e8787b116b860 |
|
MD5 | 5ae3bf317f69e1a618a3f5f661498192 |
|
BLAKE2b-256 | 532b696f64062bb38c529f3eee87d010df1152020ef8b9a8354e8a4adaeacd7c |