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.4.tar.gz
(1.7 kB
view hashes)
Built Distributions
discordrouter-0.0.4-py3.7.egg
(4.1 kB
view hashes)
Close
Hashes for discordrouter-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bcb05f9ff14d06ef2751218c6eea7720dc3b5f1e3aec4b7090f3a2500ecfaa49 |
|
MD5 | 30cfe7949330d444a36a205a2c2bcfe7 |
|
BLAKE2b-256 | dd413abc2e691cdca11a89f89de5d2e1278b6ad85393a403da0ef59b40d9fc2c |