Syrinscape Online Discord Bot Player



I’ve recently begun work on a project to stream audio from Syrinscape online via a Discord bot using Discord.js.

I’ve made some progress so far, and the github repo can be found here for anyone interested: (MIT License)

Right now, it will connect to the websocket endpoint, register the device and link it to the game. The websocket stream then received JSON messages with the .ogg files.

Once you connect to the websocket endpoint, you can register your device by sending the following two messages:

“message”: “register”,
“device_uuid”: “” //add the auth UUID from your player here

“message”: “request_linkup”,
“params”: {
“device_name”: “SyrinscapeBot”,
“player_version”: “1.4.6-20200115”,
“is_stopped”: false

and you will begin to see json response messages with mood elements such as:

“name”:“Environmental systems hum”,

From here, we can parse the .ogg files and stream them in to the Discord voice channel – but this seems a little odd to me, I would’ve expected the audio to just stream over the WebSocket channel (and be mixed on the server), so I thought I would post here first to see if anyone could confirm this is the case.

Let me know if anyone has any thoughts and feel free to submit a pull request directly to the repo.


Edit: You can get it to play a single element pretty easily by just passing the .ogg file url into the Discord dispatcher’s play method when the message comes in, by the way – there just seems to be a lot of complicated logic around mixing the files.


I sent a note to Ben and just heard back.

It looks like the player does actually mix all of the audio on the client side – this actually makes sense, now that I consider it, since it caches all of the .ogg files locally and thus only need to download the audio once, which is much more cost effective.

Unfortunately, he mentioned that the player uses some pseudo-randomness trickery to keep the players in sync, so I don’t think I will be able to keep the discord bot in sync with the other players without the source code (not that important for this usecase, really).

The other option would be to use node to read the system audio stream and just pick up the audio stream from the Online Player when it is running and pipe that to Discord, although this method has a number of drawbacks, too, and would be much less portable for others to use.

Audio mixing is a bit out of my wheelhouse, but I’m probably going to take a stab at it, anyway. Let me know if you have any thoughts!


I’ve been using

to great success as I work on my script to control Syrinscape via Twitch/Discord Chat.