Abstraction for multiple backends #31
Labels
backend
Add support for multiple backends
core
issues related to core pinhook functionality such as plugin reloading, internal commands
enhancement
additional features
Instead of having
IRCBot
andTwitchBot
classes, have a singleBot
class that takes a backend as a parameter. That could allow to split pinhook into multiple packages, likepinhook-irc
,pinhook-twitch
, etc.The backend could be a class or a string pointing to a class (to help with import troubles). A backend would be initialized with the Bot instance as a parameter, and started as soon as the bot is ready to accept events; then, the backend deals with everything and fires
on_*
events on the bot.It could be possible to use Abstract Base Classes to enforce implementing specific methods if needed.
Messages would probably need to become even more abstract (or have more possibilities than just
action
andmessage
) to provide support for backends from different paradigms (like toots or facebook privacy settings).The text was updated successfully, but these errors were encountered: