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.5.tar.gz
(1.9 kB
view hashes)
Built Distributions
discordrouter-0.0.5-py3.7.egg
(4.1 kB
view hashes)
Close
Hashes for discordrouter-0.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 629d863fbe9052ebb86cfe1c44aa5fb761830646098c7f5ebed1a2dae15191ec |
|
MD5 | 0400be2b563b10b02b9bd5fb517821f3 |
|
BLAKE2b-256 | a118f245a25761500d6ba017e03ea638874389edf46364eac0d401d83595697f |