Rapptz / discord.py

An API wrapper for Discord written in Python.
http://discordpy.rtfd.org/en/latest
MIT License
14.7k stars 3.74k forks source link

[Improvement] Message routing based on a template #1970

Closed t94j0 closed 5 years ago

t94j0 commented 5 years ago

The on_message function can sometimes be too long, so it would be great if there was a decorator that could route messages based on some sort of template.

Here is an example implementation of a decorator that could accomplish message routing through decorators: https://github.com/t94j0/discord-router

Rapptz commented 5 years ago

There is already a command extension. https://discordpy.readthedocs.io/en/rewrite/ext/commands/commands.html

I do not know what the so called router would accomplish over that.