Fixes TrackExceptionEvent not firing.
Created by: Neuheit
Summary
This PR primarily fixes #457 (closed), but also a couple other issues.
Details
The cause for this (and the TrackStuck event) not firing was because the guildId was not set in the websocket message handler, so I made it so it was set appropriately. There were also a couple bugs with websocket disconnections. One of which was the guild connection not being removed properly in case the connection couldn't resume, and the other being a WebSocketException being thrown if the client tried to send a message to Lavalink if it died.
On a minor note I also forgot to specify the UserFlags
property in the DiscordUser
class in the TransportUser
constructor.
Changes proposed
- Made the TrackException and TrackStuck events work properly.
- Made sure a guild connection would be removed in case a session couldn't be reset.
- Made sure the client wouldn't send WS messages to Lavalink if the connection was permanently cut.
- Made a minor fix to my previous PR.