What I have is a simple leave command that calls the GuildQueue.delete() method when executed, combined with leaveOnStop: true from GuildNodeCreateOptions, it makes the bot leave the voice channel. However when the leave command is executed while a song from the queue is being loaded, a Cannot read properties of null (reading 'createStream') error is thrown.
I need some guidance if this can somehow be fixed on my side or requires an update to this package, thanks in advance!
To Reproduce
Add two songs to the queue and start the playback
When the first song finishes playing, call the GuildQueue.delete() method. The time window that this method can be called and will result in a crash is dependent on the song loading time, in my case it seems to be around 2 seconds.
The bot will leave the channel but it will also crash
Expected behavior
The bot is disconnected from the voice channel, but it doesn't crash the application.
What I have is a simple
leave
command that calls theGuildQueue.delete()
method when executed, combined withleaveOnStop: true
fromGuildNodeCreateOptions
, it makes the bot leave the voice channel. However when theleave
command is executed while a song from the queue is being loaded, aCannot read properties of null (reading 'createStream')
error is thrown.I need some guidance if this can somehow be fixed on my side or requires an update to this package, thanks in advance!
To Reproduce
GuildQueue.delete()
method. The time window that this method can be called and will result in a crash is dependent on the song loading time, in my case it seems to be around 2 seconds.Expected behavior The bot is disconnected from the voice channel, but it doesn't crash the application.
Screenshots![image](https://github.com/Androz2091/discord-player/assets/70701329/fefa5666-af86-401a-ba15-50e0b8e7f49e)
Please complete the following information: