Simple to use discord paginator for messages and embeds with reactions and buttons.
Project description
paginator.py
Simple to use discord paginator for messages and embeds with reactions and buttons.
Features
- Very easy to use
- Customisable
- Change pages with buttons or reactions
- Actively maintained
Links
Installation
You can easily install it using the python package manager pip
pip install discord-paginator
Quickstart
Here are some examples that might help.
Sending a message with pages that uses reaction
from paginator import Paginator, Page, PagesType, MessagePages
from discord import Embed
...
paginator = Paginator(bot)
@bot.command()
async def test(ctx):
pages = MessagePages([
Page(content="React!", embed=Embed(title="Page #1", description="Testing")),
Page(embed=Embed(title="Page #2", description="Still testing")),
Page(embed=Embed(title="Page #3", description="Guess... testing"))
], type=PagesType.Reactions)
await paginator.send(ctx.channel, pages)
Sending a message with pages that uses buttons
from paginator import Paginator, Page, PagesType, MessagePages
from discord import Embed
...
paginator = Paginator(bot)
@bot.command()
async def test(ctx):
pages = MessagePages([
Page(content="Click!", embed=Embed(title="Page #1", description="Testing")),
Page(embed=Embed(title="Page #2", description="Still testing")),
Page(embed=Embed(title="Page #3", description="Guess... testing"))
], type=PagesType.Buttons)
await paginator.send(ctx.channel, pages)
Changing the emojis
from paginator import Paginator, PageEmojis
from discord import Embed
...
paginator = Paginator(bot)
class Emojis(PageEmojis):
def __init__(self):
super().__init__()
self.back = "⏪"
self.forward = "⏩"
paginator.page_emojis = Emojis()
Contributions
Feel free to open pull requests and improve the library. If you find any issues, please report it.
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
paginator.py-0.2.tar.gz
(5.0 kB
view hashes)
Built Distribution
Close
Hashes for paginator.py-0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46ad83f419a3c2ef12d89022800978f0143d31ea6d004bde0cdcc7891adaba91 |
|
MD5 | 3c3918d580ddcf69a2d2670771c43cf6 |
|
BLAKE2b-256 | 554ac6f547a11c884a785e66cd8062c7ff5864bf72086cf8bcac6ce063f4f9e9 |