Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

Decorator for chat bots

Project description

Discord Router

A simple router decorator for chat bots.


pip3 install discordrouter


from discordrouter import Router, message

class ChatBot(discord.Client):
  router = Router('!test')

  async def on_ready(self):
    print(f'Logged in as {}')
  async on_message(self, message):
    await self.router(message)

  @message(router, "new <name>")
  async _test1(self, items, message):
    name = items['name']

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
discordrouter-0.0.5-py3.7.egg (4.1 kB) Copy SHA256 hash SHA256 Egg 3.7

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page