Skip to main content

A button & interactions pagination template for discord bots coded in discord.py

Project description

Discord server Discord.py Supported Python versions

discord.py-paginator

Buttons pagination template for discord bots.

Useage

Install via pip.

py -m pip install -U discord.py-paginator

:: for latest/unstable
py -m pip install -U git+https://github.com/Marseel-E/discord.py-paginator

or

Download this folder and place it in your project directory. (or clone it with the following command)

git clone https://github.com/Marseel-E/discord.py-paginator

Example

import discord
from paginator import Paginator


@discord.app_commands.command()
async def command_name(interaction: discord.Interaction):
    pages = []
    page_content = ""
    
    for i in range(15):
        if (i > 0) and (i % 5 == 0):
            pages.append(page_content)
            page_content = ""

        page_content += f"{i+1}. Item `{i}`\n"

    if (page_content != "") and not (page_content in pages): pages.append(page_content)
        
    await Paginator(interaction, pages).start()

Preview

layout-preview quick-navigation-preview custom-children-preview

:scroll: LICENSE

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

discord.py-paginator-1.5.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

discord.py_paginator-1.5.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file discord.py-paginator-1.5.0.tar.gz.

File metadata

  • Download URL: discord.py-paginator-1.5.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for discord.py-paginator-1.5.0.tar.gz
Algorithm Hash digest
SHA256 d1f0d26ca9f2782f91f4430076c27383a9fb41ce6b90211521758ffd684494fa
MD5 0066554d74165b3dc2f570136e8ee534
BLAKE2b-256 d28fbc6f474706f9114003fae64f5b41be2c59b12aad794e7809bf6d5cc0b5dd

See more details on using hashes here.

File details

Details for the file discord.py_paginator-1.5.0-py3-none-any.whl.

File metadata

  • Download URL: discord.py_paginator-1.5.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.63.0 importlib-metadata/4.11.3 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for discord.py_paginator-1.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5110170df88c60c44f72f5feea89139681a48d05c84521c7ddcfb7ab7df3fb8a
MD5 42d46c218d14610179b17b909fa952c7
BLAKE2b-256 a40f2153c8bbc82f9f65f7f6d6507bde128349e5173a14f5f1112713ab764f1d

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