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
d.js toolkit
d.js toolkit•2mo ago
- 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!
chewie 🌈
chewie 🌈•2mo ago
Hello, Does the player.stop() removes and deletes the created audio player and it's resource
it 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
Python
Python•2mo ago
Oh thanks, Does it make sense that i add player.stop() before destroying the connection?
chewie 🌈
chewie 🌈•2mo ago
:SCperhaps:
Python
Python•2mo ago
But in the docs says the connection.destory() removing everything about the connection
chewie 🌈
chewie 🌈•2mo ago
it 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.
Python
Python•2mo ago
Thanks, how can i remove the player?
chewie 🌈
chewie 🌈•2mo ago
I have no idea
Python
Python•2mo ago
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: