#Voice channel

3 messages · Page 1 of 1 (latest)

olive dock
#

Hello everyone i made the bot that play random mp3 files but i want to destroy the connection whenever the mp3 audio ends
how can i know that

proud kraken
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

olive dock
#
const audioPlayer = createAudioPlayer();
      const url = "./src/assets/suspense.ogg";
      const sound = createAudioResource(url);
      audioPlayer.play(sound);
      const subscribe = connection.subscribe(audioPlayer);
      if ( audio file ended ){
        connection.destroy()
      }