Open gameveloster opened 2 years ago
Hey! thank you for the issue. Your payload and rest of the code is indeed correct, but this whole thing lacks some extra mechanism of switching discord sessions which isn't present in DMDGO's code.
My best guess is, after switching status, Discord sends over the new session ID. When discord does this, they expect us to send them opcode 6 along with our new session ID. It's the same thing they want us to do when a user disconnects from websocket. However, till now, if we got disconnected, we would just open a new websocket which is why code for SESSIONS_REPLACE is not present here.
Alternate way which would work for now is closing websocket and sending your status in the initial identify payload for the gateway to switch or starting from the desired status in the first place!
I'm trying to modify this amazing software so that it can update the presence to
"dnd"
, and do this separately from the initialIDENTIFY
request when opening a websocket connection.I tried having something like this:
and
but immediately after the first instance is connected online, I get the error
I'm very new to Go and Discord, hope someone can help me out here. @V4NSH4J Thanks!