DiscWrappy
A Python wrapper for the Discord bot API
Docs
Initialization:
import discwrappy
client = discwrappy.Client()
...
client.run(TOKEN)
Functions:
@Client.on() - decorator:
- Params:
- event_type - The type of event you're waiting for
- Function:
- Creates a "listener" which waits for the given event and triggers your function
@client.on("READY") def onReady(ready): print("bot online")
Message.send() - function:
- Params:
- message (dict) - The Mesage you want to send
- Function:
- Sends the given dict to the message's channel
@client.on("MESSAGE_CREATE") def printMessageContent(message): message.send({ "content": message.content})
discwrappy.Message() - class:
- Params:
- message (dict) - The default Discord message dict
- Function:
- Turns given message dict into a "proper object" (keys can be access with dot notation), converts numeric ids to ints, and gives the message send functions
discwrappy.User() - class:
- Params:
- user (dict) - The default Discord user dict
- Function:
- Turns given user dict into a "proper object" (keys can be access with dot notation) and converts numeric ids to ints
discwrappy.GuildMember() - class:
- Params:
- user (dict) - The default Discord guild member dict
- Function:
- Turns given guild member dict into a "proper object" (keys can be access with dot notation)
Release files for discwrappy 0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| discwrappy-0.5.tar.gz | 17.0 kB | Details |
Release files / discwrappy-0.5.tar.gz
| Download URL | discwrappy-0.5.tar.gz |
|---|---|
| Size | 17.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
be522261350b21b54916b0f77e122a57b3d130d8d49a681b1ff675e6ea290692
|
|
BLAKE2b-256 checksum How to use checksums |
f94d26e00c2a9206e2c7a9e81ba2f2c014f11438724e7da3f812a25e63b4e38c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.9
|