THE-BWC / DiscordOperationsBot

MIT License
0 stars 0 forks source link

Operations scheduled message #31

Closed Goltred closed 4 months ago

Goltred commented 7 months ago

Enable the bot to have a configurable schedule to send game operation messages to channels.

There are different approaches we can take on this since the current config is based from a settings file:

we could enable an endpoint that updates the setting: e.g. updateGameOperationNotification(gameid, channelid, schedule).

By doing this, we can allow external agents to modify this setting (provided they have the right credentials). This would grant as the possibility to add a control somewhere in opserv to modify the schedule through a nice UI.

Alternatively, we could enable a command, so that through bot commands selected individuals could configure the game for the channel they are in. E.g. !opNotifications gameId schedule

That would trigger the update to send the message for that game, on that schedule on the channel where the message is sent.

Another option would be to use the opserv db, save the configuration in there and then read periodically for updates. This would allow to work on the opserv side without exposing new endpoints, but it creates a hard dependency on an external service that is already more interconnected than it should.

PatrickPedersen commented 7 months ago

we could enable an endpoint that updates the setting: e.g. updateGameOperationNotification(gameid, channelid, schedule).

By doing this, we can allow external agents to modify this setting (provided they have the right credentials). This would grant as the possibility to add a control somewhere in opserv to modify the schedule through a nice UI.

Alternatively, we could enable a command, so that through bot commands selected individuals could configure the game for the channel they are in. E.g. !opNotifications gameId schedule

That would trigger the update to send the message for that game, on that schedule on the channel where the message is sent.

Both of these should be done. We need to be able to control it from OpServ, but I don't see an issue in allowing it to be modified in Discord as well. I have a future plan to provide the companies with their own admin dashboard to help alleviate having to go through S-1 for everything. This feature could be placed inside of that board.