
Security News
Open Source Maintainers Feeling the Weight of the EU’s Cyber Resilience Act
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
simple-embed-pagination
Advanced tools
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.
Use the package manager pip to install the library.
pip install simple-embed-pagination
Important: discord.py master, or a form that has discord.ui.View is required to use this library!
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
ctx
parameter is of typediscord.Interaction
# 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)
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
FAQs
Easily create pagination for discord.py embeds.
We found that simple-embed-pagination demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
The EU Cyber Resilience Act is prompting compliance requests that open source maintainers may not be obligated or equipped to handle.
Security News
Crates.io adds Trusted Publishing support, enabling secure GitHub Actions-based crate releases without long-lived API tokens.
Research
/Security News
Undocumented protestware found in 28 npm packages disrupts UI for Russian-language users visiting Russian and Belarusian domains.