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 paginator.py
Quickstart
Here are some examples that might help.
Sending a message with pages that uses reaction
from paginator import Paginator, Page, NavigationType
from diskord import Embed
...
paginator = Paginator(bot)
@bot.command()
async def test(ctx):
pages = [
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"))
]
await paginator.send(ctx.channel, pages, type=NavigationType.Reactions)
Sending a message with pages that uses buttons
from paginator import Paginator, Page, NavigationType
from diskord import Embed
...
paginator = Paginator(bot)
@bot.command()
async def test(ctx):
pages = [
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"))
]
await paginator.send(ctx.channel, pages, type=NavigationType.Buttons)
Changing the emojis
from paginator import Paginator, PageEmojis
...
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.8.3.tar.gz
(5.1 kB
view hashes)
Built Distribution
Close
Hashes for paginator.py-0.8.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d40c319701a950b8a4b0382326de82233a7f8cee14795e95aca2160a47f92e6 |
|
MD5 | 4cde3265f597a5c449f7ecf11775feb2 |
|
BLAKE2b-256 | 763b91b843fb012d684eaaa3fc667b1e0be0871e77e4a473757e190b542e0e15 |