#Bot stop after playing a stream for one ca. minute

4 messages · Page 1 of 1 (latest)

coral sparrow
#

My bot plays a stream and it stops after round about a minute of playing.

const connection = joinVoiceChannel({
    channelId: message.member.voice.channel.id,
    guildId: message.member.voice.channel.guildId,
    adapterCreator: message.guild.voiceAdapterCreator,
    selfDeaf: true
  });
  const player = createAudioPlayer();
  let resource = createAudioResource(streamURL);
  connection.subscribe(player);
  connection.on(VoiceConnectionStatus.Ready, () => {
    player.play(resource);
  });
  connection.on(VoiceConnectionStatus.Disconnected, async () => {
    connection.destroy();
  });

Thats my code to play the stream and these are my dependencies:

        "@discordjs/opus": "^0.8.0",
        "@discordjs/rest": "^1.0.0",
        "@discordjs/voice": "^0.11.0",
        "discord-api-types": "^0.36.3",
        "discord.js": "^14.0.3",
        "ffmpeg-static": "^5.0.2",
        "libsodium-wrappers": "^0.7.10",
        "node-fetch": "^3.2.9"

Node version: v18.16.0
Npm version: 9.6.4

gusty treeBOT
#

• 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.

stuck gust
#

update your djs voice

ornate plover
#

And while you‘re at it also your djs mainlib