Paginator for Dis-Snek Python Discord API wrapper

Overview

snek-paginator

Paginator for Dis-Snek Python Discord API wrapper

Installation:

pip install -U snek-paginator

Basic Example:

from dis_snek.client import Snake
from dis_snek.models.application_commands import slash_command
from dis_snek.models import Embed
from snek_paginator import Paginator

bot = Snake()

@slash_command('paginator')
async def paginator(ctx):
    embeds = [
        Embed(title='Page 1', description='This is page 1'),
        Embed(title='Page 2', description='This is page 2'),
        Embed(title='Page 3', description='This is page 3'),
        Embed(title='Page 4', description='This is page 4'),
        Embed(title='Page 5', description='This is page 5'),
    ]
    await Paginator(bot, ctx, embeds).run()

class Paginator

method run(*args, **kwargs)

Required:

  • bot: Snake - The bot instance
  • ctx: InteractionContext - The context of the command or component
  • pages: list[Embed] - A list of Embed objects to paginate

Optional:

  • timeout: int = None - How long in seconds the paginator should run
  • author_only: bool = False - Whether the paginator should only be used by the author
  • only_for: Union[User, Member, Role, List[Union[User, Member, Role]]] = None - Who should use the paginator
  • use_select: bool = True - Whether the paginator should use the select
  • use_buttons: bool = True - Whether the paginator should use the buttons
  • disable_after_timeout: bool = True - Whether the components should disable after timeout
  • delete_after_timeout: bool = False - Whether the components should delete after timeout
  • extend_buttons: bool = True - Whether the first and last page buttons should be used
  • first_button: Button = Button(ButtonStyles.BLUE, emoji="⏮") - The first page button
  • previous_button: Button = Button(ButtonStyles.BLUE, emoji="◀") - The previous page button
  • next_button: Button = Button(ButtonStyles.BLUE, emoji="▶") - The next page button
  • last_button: Button = Button(ButtonStyles.BLUE, emoji="⏭") - The last page button
You might also like...
A Python wrapper for discord slash-commands, designed to extend discord.py.

dislash.py An extending library for discord.py that allows to build awesome slash-commands. ⭐

A Anything goes Discord bot written in python and uses the wrapper Discord.py

GerardTheWizard A Anything goes Discord bot written in python and uses the wrapper Discord.py What can he do? Allow users to level up through typing,

Volt is yet another discord api wrapper for Python. It supports python 3.8 +

Volt Volt is yet another discord api wrapper for Python. It supports python 3.8 + How to install [Currently Not Supported.] pip install volt.py Speed

Anime-Discord-Bot - Lightweight anime searching Discord bot supported by the AnilistPython library (anilist.co APIv2 wrapper))
An API wrapper for Discord written in Python.

discord.py A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. Key Features Modern Pythonic API using asyn

A wrapper for the Discord Python Pixels API.

DPYPX A simple wrapper around Python Discord Pixels. Requires Python 3.7+ (3.x where x = 7). Requires pillow and aiohttp from pip. Example import dpy

DiscWrappy - A Python wrapper for the Discord bot API

DiscWrappy - A Python wrapper for the Discord bot API

🚀 A fast, flexible and lightweight Discord API wrapper for Python.
🚀 A fast, flexible and lightweight Discord API wrapper for Python.

Krema A fast, flexible and lightweight Discord API wrapper for Python. Installation Unikorn unikorn add kremayard krema -no-confirmation Pip pip insta

A simple API wrapper for Discord written in Python.

AIOCord This project is work in progress not for production use A simple asynchronous API wrapper around Discord API written in Python. Inspiration Th

Releases(1.0.0)
Owner
null
A module to complement discord.py that has Music, Paginator and Levelling.

discord-super-utils A modern python module including many useful features that make discord bot programming extremely easy. Features Modern leveling m

Yash 106 Dec 19, 2022
🚀 An asynchronous python API wrapper meant to replace discord.py - Snappy discord api wrapper written with aiohttp & websockets

Pincer An asynchronous python API wrapper meant to replace discord.py ❗ The package is currently within the planning phase ?? Links |Join the discord

Pincer 125 Dec 26, 2022
Discord-Wrapper - Discord Websocket Wrapper in python

This does not currently work and is in development Discord Websocket Wrapper in

null 3 Oct 25, 2022
Pycord, a maintained fork of discord.py, is a python wrapper for the Discord API

pycord A fork of discord.py. PyCord is a modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. Key Features Mo

Pycord Development 2.3k Dec 31, 2022
An asyncio Python wrapper around the Discord API, forked off of Rapptz's Discord.py.

Novus A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. A full fork of Rapptz's Discord.py library, with

Voxel Fox 60 Jan 3, 2023
PyDiscord, a maintained fork of discord.py, is a python wrapper for the Discord API.

discord.py A modern, easy to use, feature-rich, and async ready API wrapper for Discord written in Python. The Future of discord.py Please read the gi

Omkaar 1 Jan 16, 2022
An API wrapper for discord; maintained and improved from discord.py

Fusion.py Documentation What is Fusion.py you might ask; Fusion.py is a Discord.py fork that has most of the good features from most of the big Discor

Senarc Studios 5 Apr 19, 2022
EpikCord.py - This is an API Wrapper for Discord's API for Python

EpikCord.py - This is an API Wrapper for Discord's API for Python! We've decided not to fork discord.py and start completely from scratch for a new, better structuring system!

EpikHost 28 Oct 10, 2022
An API wrapper around Discord API.

NeoCord This project is work in progress not for production use. An asynchronous API wrapper around Discord API written in Python. Features Modern API

Izhar Ahmad 14 Jan 3, 2022
Aws-lambda-requests-wrapper - Request/Response wrapper for AWS Lambda with API Gateway

AWS Lambda Requests Wrapper Request/Response wrapper for AWS Lambda with API Gat

null 1 May 20, 2022