krisppurg / dimscord

A Discord Bot & REST Library for Nim.
https://krisppurg.github.io/dimscord/
MIT License
222 stars 20 forks source link

Use the latest ws #81

Closed t8m8 closed 1 year ago

t8m8 commented 1 year ago

When I was using ws@0.4.0, I was getting the following error every time when resuming.

[shard: 0]: Connecting to wss://gateway-us-east1-c.discord.gg/?v=10
[shard: 0]: Attempting to resume
  session_id: 009578068343d3196e5316d56a25a853
  sequence: 1340
[shard: 0]: Sending OP: 6
[shard: 0]: Error occurred in websocket ::
WebSocket Potocol missmatch

I tried various solutions, but finally, by using the ws@0.5.0, the error on resume no longer occurs. Now it seems that it is preferable to use the latest ws.

[shard: 0]: Shard reconnecting after disconnect...
[shard: 0]: Connecting to wss://gateway-us-east1-c.discord.gg/?v=10                                                                                                            
[shard: 0]: Attempting to resume
  session_id: 0ad7ea10d6cbb4d00ce8e8006c420afe
  sequence: 1924  
[shard: 0]: Sending OP: 6
[shard: 0]: Received 'HELLO' from the gateway.
[shard: 0]: Received event: RESUMED
[shard: 0]: Successfuly resumed.