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.3.tar.gz
(1.7 kB
view hashes)
Built Distribution
Close
Hashes for discordrouter-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a9a1f33ea933c84ee2201a62448d709f3139a9e065df6ab0eb6dc788860853e |
|
MD5 | 0207f175204b5ff2767ac2c568982ba9 |
|
BLAKE2b-256 | ad5f5de360ab9fe12f7a9b4625b8e53b1d0029add9ce6ee4aca344067b90947c |