Skip to content

Abstraction for multiple backends #31

Description

@Lucidiot

Instead of having IRCBot and TwitchBot classes, have a single Bot class that takes a backend as a parameter. That could allow to split pinhook into multiple packages, like pinhook-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 and message) to provide support for backends from different paradigms (like toots or facebook privacy settings).

Metadata

Metadata

Assignees

No one assigned

    Labels

    backendAdd support for multiple backendscoreissues related to core pinhook functionality such as plugin reloading, internal commandsenhancementadditional features

    Projects

    Status
    Backends

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions