Skip to main content

Install

pip install dpy-devtools

Docs

PENDING... Until then, here is some implementation code:

from discord.ext import commands
import discord
from dpydevtools import DevTools, ControlGroupOptions


bot = commands.Bot(...)
tools = DevTools(
    "!bot",
    bot,
    cg_defaults={
        "global": ControlGroupOptions.disabled,
        "example_group_0": ControlGroupOptions.adminplus},
    cw_defaults={"example_whitelist_0": [12345678901234567890]})


@bot.command(name="bot")
async def cmd(ctx: commands.Context, *queries: str) -> None:
    return await tools.delegate(ctx, *queries)


@bot.command(name="test")
@tools.command(
    group="example_group_0",
    whitelist="example_whitelist_0",
    tracker="example_tracker_0"
)
async def test_command(...): ...


bot.run(...)

When using extensions, you must use .placeholder in combination with resolve_placeholders:

from dpydevtools import DevTools
from discord.ext import commands


class mycog(commands.Cog):
    def __init__(self, bot: commands.Bot) -> None:
        self.bot = commands.Bot
        DevTools.get(bot).resolve_placeholders(self)

    # make sure the placeholder is at the very top (or
    # more specifically, make sure it happens *after*
    # the command is created)
    @DevTools.placeholder(group=..., ...) 
    @commands.command(name="test")
    async def test_command(...): ...


async def setup(...):...

The available commands can be accessed by running <prefix><commandname> -h. This uses argparse, and is navigatable in a similar way through discord.

Metadata

Release files for dpy-devtools 0.0.3

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

Source distribution (sdist)

Source distribution for dpy-devtools 0.0.3
File Size Uploaded Provenance Actions
dpy-devtools-0.0.3.tar.gz 14.9 kB Without provenance Details for dpy-devtools-0.0.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for dpy-devtools 0.0.3
File Interpreter ABI Platform Actions
dpy_devtools-0.0.3-py3-none-any.whl Python 3 none any Details for dpy_devtools-0.0.3-py3-none-any.whl

Total release size: 32.0 kB

Release files / dpy-devtools-0.0.3.tar.gz

Download URL dpy-devtools-0.0.3.tar.gz
Size 14.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0bd16c884980ef67150c671fe8fc2c56c90b84156aae17edb0020fc38e3c2c3c
BLAKE2b-256 checksum
How to use checksums
c37a249af9de3db7283675c2700dcacad760e097861bc7ac88932675ee0c7d94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.1

Release files / dpy_devtools-0.0.3-py3-none-any.whl

Download URL dpy_devtools-0.0.3-py3-none-any.whl
Size 17.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a5d57cc7eb2826b8331ebbec1232350ed4fd0eaae21083c0da34a556c5ff630b
BLAKE2b-256 checksum
How to use checksums
db527c7b7d39f407bcf53f53ab3d3cb671f47875f236779ba3fc31bf57feff63
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.1

Security for dpy-devtools 0.0.3

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