sleepy-discord
sleepy-discord copied to clipboard
updateStatus() fails with 4001 (Unknown opcode)
Calling updateStatus with any status argument in onReady or onMessage (just as a test) gives the following output:
[2018-02-11 12:19:24] [connect] Successful connection [2018-02-11 12:19:24] [connect] WebSocket Connection 104.16.60.37:443 v-2 "WebSocket++/0.7.0" /?v=6 101 Ready! [2018-02-11 12:19:25] [error] handle_read_frame error: asio.ssl.stream:1 (stream truncated) [2018-02-11 12:19:25] [info] asio async_shutdown error: asio.ssl.stream:1 (stream truncated) [2018-02-11 12:19:25] [disconnect] Disconnect close local:[1006,stream truncated] remote:[4001,Unknown opcode.]
Can be reproduced by adding callback like:
void onReady(std::string* jsonMsg) { updateStatus("some status"); }
into one of the examples.
Looking into the library code, it uses STATUS_UPDATE (3) when creating JSON message, which is still correct according to https://discordapp.com/developers/docs/topics/opcodes-and-status-codes#gateway-opcodes - so I'm not sure what's happening here.
sendMessage and other functions are working fine for me.
Has it failed for anyone else?
Someone else did have an issue with updateStatus() issue #40 . However, I have yet to look into it. What I'm guessing is the issue is that the Client isn't sending the status in the correct format. I right now can't look into it as I have to get my client with new features working before I can do some debugging on this issue.