A while back we added the DiscordBot service to MyRobotLab. The Discord Bot service acts as a gateway.
The DiscordBot service implements 2 interfaces in MyRobotLab, the first is UtterancePublisher and the UtteranceListener.
The idea is that DiscordBot connects to a discord server using the Discord java API. The DiscordBot logs into the server using a security token that is associated with a discord bot user.
The discord bot is permissioned to get and send messages from some channels or direct messages. Currently, the discord bot only supports text messages, (audio/video is not supported at this time.)
The DiscordBot service acts as a gateway that converts the discord messages into Utterances.
On the MyRobotLab side, then ProgramAB can listen for those utterances, process the utterance to produce a response utterance. This response utterance is then published to the DiscordBot service. The DiscordBot service then relays the response to the appropriate channel on the Discord server.
So, here's a diagram:
Ok, and here's some simple python code that can start the discord bot service and the programab service.