A button & interactions pagination template for discord bots coded in discord.py
Project description
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
:scroll: LICENSE
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
Built Distribution
Close
Hashes for discord.py-paginator-1.5.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1f0d26ca9f2782f91f4430076c27383a9fb41ce6b90211521758ffd684494fa |
|
MD5 | 0066554d74165b3dc2f570136e8ee534 |
|
BLAKE2b-256 | d28fbc6f474706f9114003fae64f5b41be2c59b12aad794e7809bf6d5cc0b5dd |
Close
Hashes for discord.py_paginator-1.5.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5110170df88c60c44f72f5feea89139681a48d05c84521c7ddcfb7ab7df3fb8a |
|
MD5 | 42d46c218d14610179b17b909fa952c7 |
|
BLAKE2b-256 | a40f2153c8bbc82f9f65f7f6d6507bde128349e5173a14f5f1112713ab764f1d |