LavalinkGuildConnection CurrentTrack set to default on track replace
Created by: Kriste00
Details
LavalinGuildConnection.CurrentState.CurrentTrack
gets set to default when replacing the currently playing track
Here the TrackFinish event is invoked with reason REPLACED, and the current track is set to default.
Steps to reproduce
- Play a song
- Play another song
-
LavalinGuildConnection.CurrentState.CurrentTrack
is set to default, not the 2nd song as it should.
Fix
Add if (e.Reason != TrackEndReason.Replaced) this.CurrentState.CurrentTrack = default;