Audio Player and Voice Connection
Hello, Does the
player.stop()
removes and deletes the created audio player and it's resource
And i wanna know does the connection.destory()
removes the created audio player and it's resource as well?9 Replies
- What's your exact discord.js
npm list discord.js
and node node -v
version?
- Not a discord.js issue? Check out #other-js-ts.
- Consider reading #how-to-get-help to improve your question!
- Explain what exactly your issue is.
- Post the full error stack trace, not just the top part!
- Show your code!
- Issue solved? Press the button!Hello, Does the player.stop() removes and deletes the created audio player and it's resourceit destroys the resource, but it doesn't remove the player
And i wanna know does the connection.destory() removes the created audio player and it's resource as well?probably not
Oh thanks, Does it make sense that i add
player.stop()
before destroying the connection?:SCperhaps:
But in the docs says the
connection.destory()
removing everything about the connectionit does not
Destroys the VoiceConnection, preventing it from connecting to voice again. This method should be called when you no longer require the VoiceConnection to prevent memory leaks.
Thanks, how can i remove the player?
I have no idea
Actually i create the player to check that the provided resource is playable or not
And if is not returns a message and also removes the created player because i don't need it anymore
Honestly i don't care about the created audio player, I wanna remove it just for prevent memory leaking :FeelsBadMan: