embed-pagination
Notes
This project is a fork of an inactive repository at https://github.com/soosBot-com/Pagination
Credit is due to the contributors of the original project.
New features 💡
- Added new on_timeout options
- Added buttons for first/last page
- Improved button layout
- Many more general improvements
Installation
Use the package manager pip to install the library.
pip install simple-embed-pagination
Usage
Important: discord.py master, or a form that has discord.ui.View is required to use this library!
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)
Hint: The
ctxparameter is of typediscord.Interaction
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 discord.ButtonStyle
InitialPage = 0 # Page to start the paginator on.
OnTimeout = 'disable_view' # Delete paginator message on timeout. Default is False.
timeout = 400 # Seconds to timeout. Default is 60.
ephemeral = True # Defaults to False if not passed in.
FirstButton = discord.ui.Button(...)
LastButton = discord.ui.Button(...)
await paginator.Simple(
previous_button=">",
next_buttom=NextButton,
page_counter_style=PageCounterStyle,
initial_page=InitialPage,
allow_ext_input=True,
on_timeout=DeleteOnTimeout,
timeout=timeout,
ephemeral=ephemeral,
first_button=FirstButton,
last_button=LastButton
).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.
License
Metadata
Release files for simple-embed-pagination 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| simple-embed-pagination-1.0.2.tar.gz | 4.8 kB | Without provenance | Details for simple-embed-pagination-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| simple_embed_pagination-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for simple_embed_pagination-1.0.2-py3-none-any.whl |
Total release size: 9.9 kB
Release files / simple-embed-pagination-1.0.2.tar.gz
| Download URL | simple-embed-pagination-1.0.2.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d2f8895e34a5a037f76d0f44bb19d2c9449e73e6ee619cd3490e0ed31da4a166
|
|
BLAKE2b-256 checksum How to use checksums |
d3ebfbc5d693bd7d656197973bfac53dc3ff1f14b766ee02b40a418a591a6660
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|
Release files / simple_embed_pagination-1.0.2-py3-none-any.whl
| Download URL | simple_embed_pagination-1.0.2-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c89f2439637255cc8f86afbb99056f289050db8ce5ee9b6376c8690c526d9386
|
|
BLAKE2b-256 checksum How to use checksums |
a634099cb7f52f65f675a46fb06d53f0637d73353b9a1169412d5b2505d5fad1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.1
|
Security for simple-embed-pagination 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.