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 Distribution
Markinator-0.0.5.tar.gz
(4.1 kB
view hashes)
Built Distribution
Close
Hashes for Markinator-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b5f6db43871ebd386a215960fa4d2ca974158aef195af0a2579f9ed233837a8d |
|
MD5 | 1c9a9aded682d7eaffd5f5b7cf327e86 |
|
BLAKE2b-256 | 9d72daa29a33a88640e66e6d27d851debe0ae765e2e823f671ef62143ffe7aa4 |