Skip to main content

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

Metadata

Release files for snek-paginator 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for snek-paginator 1.0.0
File Size Uploaded Provenance Actions
snek_paginator-1.0.0.tar.gz 16.0 kB Without provenance Details for snek_paginator-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for snek-paginator 1.0.0
File Interpreter ABI Platform Actions
snek_paginator-1.0.0-py3-none-any.whl Python 3 none any Details for snek_paginator-1.0.0-py3-none-any.whl

Total release size: 32.6 kB

Release files / snek_paginator-1.0.0.tar.gz

Download URL snek_paginator-1.0.0.tar.gz
Size 16.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f92d37e9d8dff0d95ca634fc2e1a305da644ab27fa7938e1c74359205a85a94e
BLAKE2b-256 checksum
How to use checksums
5a0057232f015b858579020e88457c889d87044a85f6eeecf211d3cc77925d6f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Release files / snek_paginator-1.0.0-py3-none-any.whl

Download URL snek_paginator-1.0.0-py3-none-any.whl
Size 16.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c7efe8662e54903b4994907c4b8370aaf5c0122b3a4d6b2c0fc5c8e5643453a1
BLAKE2b-256 checksum
How to use checksums
5a7bec3eee21117d320bc8a4572c331dcfe784fd6e7ae1c58ec3f75c0cbf435b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

Security for snek-paginator 1.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page