Skip to main content

Disputils

Disputils provides some neat features to make your life as a bot developer easier.

Features

Quick overview of the available features.

For all features there are two ways to use them.

  • just discord.py and a basic discord.Client

  • discord.py commands extension (discord.ext.commands) and a Bot

In the following we’re going to use the second way since it’s a bit easier.

from disputils import BotEmbedPaginator, BotConfirmation, BotMultipleChoice

Pagination

Split your content into multiple pages and use reactions to paginate through.

@bot.command()
async def paginate(ctx):
    embeds = [
        Embed(title="test page 1", description="This is just some test content!", color=0x115599),
        Embed(title="test page 2", description="Nothing interesting here.", color=0x5599ff),
        Embed(title="test page 3", description="Why are you still here?", color=0x191638)
    ]

    paginator = BotEmbedPaginator(ctx, embeds)
    await paginator.run()
docs/img/paginate.png

Multiple Choice

Let the user decide. Provide multiple choice!

@bot.command()
async def choice(ctx):
    multiple_choice = BotMultipleChoice(ctx, ['one', 'two', 'three', 'four', 'five', 'six'], "Testing stuff")
    await multiple_choice.run()

    await multiple_choice.quit(multiple_choice.choice)
docs/img/choice.png

Confirmation

Is the user going to do something irreversible? Let him confirm first!

@bot.command()
async def confirm(ctx):
    confirmation = BotConfirmation(ctx, 0x012345)
    await confirmation.confirm("Are you sure?")

    if confirmation.confirmed:
        await confirmation.update("Confirmed", color=0x55ff55)
    else:
        await confirmation.update("Not confirmed", hide_author=True, color=0xff5555)
docs/img/confirm.png

Requirements

Metadata

Release files for disputils 0.1.1

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

Source distribution (sdist)

Source distribution for disputils 0.1.1
File Size Uploaded Provenance Actions
disputils-0.1.1.tar.gz 5.5 kB Without provenance Details for disputils-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for disputils 0.1.1
File Interpreter ABI Platform Actions
disputils-0.1.1-py3-none-any.whl Python 3 none any Details for disputils-0.1.1-py3-none-any.whl

Total release size: 12.9 kB

Release files / disputils-0.1.1.tar.gz

Download URL disputils-0.1.1.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
5e3b148a8057a54af133f5ec9056175f322aaae85e469faa265421fd74d6e19c
BLAKE2b-256 checksum
How to use checksums
c5f5cf9edd5652aa7258264d6bfe9491243c228549f5c421c135a2caeaaa7813
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.31.0 CPython/3.7.1

Release files / disputils-0.1.1-py3-none-any.whl

Download URL disputils-0.1.1-py3-none-any.whl
Size 7.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5159b1ce473808c54634b4c484e9b0bf54dd964aa9730fcf5efb7dda3477324f
BLAKE2b-256 checksum
How to use checksums
5f699c41c1fe25cb0fed31184b4e00dabf759c931b89f362e48046c992626067
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.1.0 requests-toolbelt/0.9.1 tqdm/4.31.0 CPython/3.7.1

Security for disputils 0.1.1

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.

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