Some extra discord.py utilities
If you're on Windows, the command is a little different depending on how you installed Python.
Linux / macOS / Microsoft Store Python:
python3 -m pip install -U git+https://github.com/clari7744/DPyUtils.git
Windows:
py -3 -m pip install -U git+https://github.com/clari7744/DPyUtils.git
Overview:
- Duration utilities
- Context editor: Allows users to edit their message, which will edit the command response.
- Extra converters:
- Advanced Converters: Member, User, Role, Color, CategoryChannel, TextChannel, ForumChannel, Thread, VoiceChannel, StageChannel, CategoryChannel
- Added Converters: BotMember, HumanMember, BotUser, HumanUser, NewsChannel, AnyChannel, NonCategoryChannel
- Debug Cog
Duration Utilities
duration.Duration
: A converter that converts input from1y1w1d1h1m1s
format to seconds.duration.parse
: Accepts seconds ordatetime.timedelta
, and changes it to acollections.namedtuple
with each unit in it individually (duration.ParsedDuration(years=1, weeks=1, days=1, hours=1, minutes=1, seconds=1)
)duration.strfdur
: Accepts seconds,datetime.timedelta
, orduration.ParsedDuration
and converts it to a human-readable string.- Example:
10000 seconds
->2 hours, 46 minutes, and 40 seconds
- Example:
To use the utilities provided in this module, just import DPyUtils.duration
Converters
Context Editor
While this repository is meant to be fairly stable, as I have a personal repository that I use for testing and I do plan to only add items to this build once they've been tested and found to be bug-free, I'm not perfect, and there may be some issues. If you do run into any problems while using my tools, please ping me in my server so I can take a look and get that fixed. Thank you for your help debugging, and thanks for using my discord.py utilities!
- @clari7744 💜