Skip to content

Implement master/channel bot #3

@naanselmo

Description

@naanselmo

Basically, implement a configuration toggle that allows a bot to act as a master (relaying commands to "free" bots), perhaps even having additional commands available.

Whether the master bot should know all bots (checking the database) and relaying commands to them, or whether it should instead send commands to a specific bot id (e.g. 0) that then gets picked up by another entity (which in turn sends them to the correct free bots), is up for discussion.

A bot being free or being offline are two distinct things that need to be properly evaluated, otherwise a dead bot can end up having lots of queued games.

Perhaps a new table, with botid and a timer, and bots are only considered alive if they have their entry in that table with a timestamp not older than, for example, a minute? Then even a database trigger could relay commands and, with proper locking, ensure atomicity.

I'm particularly fond of the table idea, as it'd solve a lot of problems and enable more advanced integration features (e.g. website, would just need to know how to insert into the table).

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions