Decorator for discord.py chat bots
Project description
Discord Router
A simple router decorator for discord.py chat bots.
Installation
pip3 install discordrouter
Usage
from discordrouter import Router, message
class ChatBot(discord.Client):
router = Router('!test')
async def on_ready(self):
print(f'Logged in as {self.user.name}')
async on_message(self, message):
await self.router(message)
@message(router, "new <name>")
async _test1(self, items, message):
name = items['name']
await message.channel.send('{name}')
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
discordrouter-0.0.2.tar.gz
(1.7 kB
view details)
Built Distribution
File details
Details for the file discordrouter-0.0.2.tar.gz
.
File metadata
- Download URL: discordrouter-0.0.2.tar.gz
- Upload date:
- Size: 1.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 440a4fa0e43a9621a624743ce1720f2ec8ab97c530e9529d05ae753aade4a73d |
|
MD5 | 0191fc41a7d875835ec27e12888d9bcc |
|
BLAKE2b-256 | eef30a34310abf18cbf1682d00211c4568619c27109fb22d4f1cc98de7fb1f83 |
File details
Details for the file discordrouter-0.0.2-py3-none-any.whl
.
File metadata
- Download URL: discordrouter-0.0.2-py3-none-any.whl
- Upload date:
- Size: 2.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2246966e59dd83650dce10207af22332d314e4bdc8245c78d964e440fbcbad2 |
|
MD5 | da23a88bca7400c7e937ae9feba72270 |
|
BLAKE2b-256 | fe586368561b1ff56816e742d00e694020c19f82816d258f23656baf155a21a3 |