A discord.py utility library.
Project description
dpy-utils
A discord.py utility library.
Warning
This is a very early alpha version. There might be some unknown issues.
Features
-
custom Context with additional features like
ctx.ask -
patched
BotandAutoShardedBotclasses:- use custom Context
- automatically loads token and prefix from
.envfile - automatically loads cogs/extensions from
cogs/(can be modified through thecogs_pathargument)
-
monkey_patch()to overwritediscord.pyclasses withdpy-utils
Installation
pip install dpy-utils
Usage
.env
TOKEN=token
PREFIX=?
bot.py
import os
import utils
from discord.ext import commands
utils.monkey_patch()
bot: utils.Bot = commands.Bot()
@bot.command()
async def test(ctx: utils.Context):
answer = await ctx.ask("Do you like dpy-utils?")
print(answer)
bot.run()
Requirements
- Python >= 3.6
- pydantic
- python-dotenv
- discord.py
Contributing and Issues
If you want to contribute or want to suggest additional features please use github issues.
Project details
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dpy-utils-0.1.0.tar.gz.
File metadata
- Download URL: dpy-utils-0.1.0.tar.gz
- Upload date:
- Size: 16.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.1 Linux/5.4.0-1032-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c8a9e58bfa9207361d0673885352bb745d4b891a416b0d9f43cef6f5635b6489
|
|
| MD5 |
3b4aeea71268c3cbfea2cc8b101fd4e2
|
|
| BLAKE2b-256 |
fddb2098d9bcf62231d43c487822a523dd6dd4382be7b74770640d1855710bcd
|
File details
Details for the file dpy_utils-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dpy_utils-0.1.0-py3-none-any.whl
- Upload date:
- Size: 17.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.4 CPython/3.9.1 Linux/5.4.0-1032-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f01f3de1539c7f4302d6c2b1b2331a80796487b4dc4e726e55b8be91ec6220a
|
|
| MD5 |
aa620ada2ae3409cb0e877f9e3e68b2d
|
|
| BLAKE2b-256 |
1f52b08871a2a2e485375f5cc61a8fb5c0c98c509f7c0d384f3bface2d575adb
|