TediCross
TediCross copied to clipboard
Hooks
Implement some way to hook into the bot's operations, like bot.on("telegram.messageReceived", (message, bridge) => ...), so people can write extensions to it
In order for this to work well with the requested use-case of chat moderation, I think we might want to combine this hooks idea with the idea of a general, platform-independent API to get content from any platform.
So that bot.on('text', ...) would apply to messages from both Telegram and Discord.
If we manage to do this, we can:
- Make message-passing between platforms way cleaner
- Have each platform provide an emitter that matches the API spec we decide on
- Easily add new platforms
- Easily add plugins that will work for multiple platforms (consuming the emitter API)