-
-
Notifications
You must be signed in to change notification settings - Fork 5
Abstraction for multiple backends #31
Copy link
Copy link
Open
Labels
backendAdd support for multiple backendsAdd support for multiple backendscoreissues related to core pinhook functionality such as plugin reloading, internal commandsissues related to core pinhook functionality such as plugin reloading, internal commandsenhancementadditional featuresadditional features
Description
Metadata
Metadata
Assignees
Labels
backendAdd support for multiple backendsAdd support for multiple backendscoreissues related to core pinhook functionality such as plugin reloading, internal commandsissues related to core pinhook functionality such as plugin reloading, internal commandsenhancementadditional featuresadditional features
Projects
StatusShow more project fields
Backends
Instead of having
IRCBotandTwitchBotclasses, have a singleBotclass 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
actionandmessage) to provide support for backends from different paradigms (like toots or facebook privacy settings).