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.1.tar.gz
(1.6 kB
view hashes)
Built Distribution
Close
Hashes for discordrouter-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1f21d08613eaa7e9d9f908fe340697b5ed705bfe3cf2775a0c00a81f8308f427 |
|
MD5 | 7638077dce8c9c777f165ea5d3d344d2 |
|
BLAKE2b-256 | 3f01579d777bdd7a3741592b0362bb5ad3c7ae9977910bb82c16ffe5d67dd062 |