Skip to main content

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 discord 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 discord 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


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.9.4.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

paginator.py-0.9.4-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file paginator.py-0.9.4.tar.gz.

File metadata

  • Download URL: paginator.py-0.9.4.tar.gz
  • Upload date:
  • Size: 5.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for paginator.py-0.9.4.tar.gz
Algorithm Hash digest
SHA256 50f21400e8a308e5c06a3bcb5aea92ebb57855d6ba48d8488889ef00e91ee129
MD5 8b3a452addfb1615fe9ab3989f894a8e
BLAKE2b-256 9311fed24f902fb3207553184d0d0f7b856660de6091b0a84543aa65e7f00501

See more details on using hashes here.

File details

Details for the file paginator.py-0.9.4-py3-none-any.whl.

File metadata

  • Download URL: paginator.py-0.9.4-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.12

File hashes

Hashes for paginator.py-0.9.4-py3-none-any.whl
Algorithm Hash digest
SHA256 b908d8ff8007c7db03453aa2e16adfc014c8aa2a0b7538e4916ca79da40dc859
MD5 d98601091f35b9f534a7e4b64f4affb4
BLAKE2b-256 9f5aba65b35faf6b355f3ea5811793f7bfcb29d2d45f9c93a39dbd87179ffc61

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page