serenity-rs / songbird

An async Rust library for the Discord voice API
ISC License
384 stars 110 forks source link

fix(ws): Songbird would fail if it could not deserialize ws payload. #170

Closed Erk- closed 1 year ago

Erk- commented 1 year ago

Discord started sending a new event on the voice websocket with opcode 18:

{"op":18,"d":{"user_id":"...","flags":0}}

This caused songbird to crash and disconnect.

This patch makes it so that failing to deserialize a event is not a fatal error.

Skarlett commented 1 year ago

updated my project with pr-branch, appears to work great.

https://github.com/Skarlett/coggie-bot/commit/1986feae8ca50e2a2924ccdd04e22e2ca9f243cb