DSharpPlus
DSharpPlus copied to clipboard
CurrentTrack is not null after stopAsync
Make sure you familiarize yourself with our contributing guidelines.
Summary
When I call the stopAsync function to stop the currentrack such that I can play a new track aka skip. The currenTrack state does not get updated and thus when the new song is playing and I want to add a song to my queue it thinks that there is no song playing and it overwrites the currently playing song. Since I check whether currentTrack == null.
Details
OS: Windows 10/11 and raspberry OS framework: .net 7.0
Steps to reproduce
- Play any song
- Use StopAsync() and immediately play a new song or in my case next song in queue
- While song is playing, play a new one but check if song is playing using currenttrack.
- notice that playing song is overwritten by the new song
Notes
I think adding the line CurrentState.CurrentTrack = null;
to StopAsync() will solve the problem.
But I am fairly new to this so maybe this is intended. In that case how do I check wether a song is playing after using StopAsync()?
Please specify what version of DSharpPlus and what extension you are using.
I am using version 4.3.0 and lavalink version 3.7.8