Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/clari7744/DPyUtils
Some extra discord.py utilities
https://github.com/clari7744/DPyUtils
Last synced: about 1 month ago
JSON representation
Some extra discord.py utilities
- Host: GitHub
- URL: https://github.com/clari7744/DPyUtils
- Owner: clari7744
- License: mit
- Created: 2021-04-28T17:21:33.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-22T22:14:19.000Z (7 months ago)
- Last Synced: 2024-08-22T03:02:01.972Z (5 months ago)
- Language: Python
- Size: 178 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-discordpy - clari7744/DPyUtils - Some extra discord.py additions such as duration utilities, converters, a context editor and more. (Libraries and Extensions / Utilities)
README
# DPyUtils
Some extra discord.py utilities## Installation:
If you're on Windows, the command is a little different depending on how you installed Python.Linux / macOS / Microsoft Store Python:
```sh
python3 -m pip install -U git+https://github.com/clari7744/DPyUtils.git
```Windows:
```ps
py -3 -m pip install -U git+https://github.com/clari7744/DPyUtils.git
```## Information
Overview:
##### Features:
* 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##### Coming Soon (More details later):
* Debug CogDuration Utilities
##### Utilities:
* `duration.Duration`: A converter that converts input from `1y1w1d1h1m1s` format to seconds.
* `duration.parse`: Accepts seconds or `datetime.timedelta`, and changes it to a `collections.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`, or `duration.ParsedDuration` and converts it to a human-readable string.
- Example: `10000 seconds` -> `2 hours, 46 minutes, and 40 seconds`##### Usage:
To use the utilities provided in this module, just import `DPyUtils.duration`Converters
Context Editor
### Note:
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](https://discord.gg/EQkDnBS) 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 💜