discord.js: Debian 8 not resolving voiceChannel.join

Please describe the problem you are having in as much detail as possible: voiceChannel.join never resolves it’s promise, when logging message.guild.voiceConnection.status, I get a continuous 1. As far as I understand, this means it’s not connected but trying to. This never goes away and it never resolves it’s connection.

several people were trying to figure out the issue in discord.js chat, but were unable to. This was kind of late at night though, so not many around. I’ve tried this also with just skipping the promise method entirely and just throwing a sleep in there for kicks, but to no avail. The below code was actually from another issue from the discord.js github to test the problem, just to see if it was my code by chance. This below never completes the connection.

ffmpeg is installed to the server itself utilizing apt-get install ffmpeg, and node-opus was installed to the bot. Also tried switching regions to see if that was the issue or not, since it seems that has been an issue in the past.

Include a reproducible code sample here, if possible:

const ytdl = require('ytdl-core');
const Dispatchers = new Map();

function play(connection) {
  let Dispatch = Dispatchers.get(message.guild.id);
  let stream = ytdl('https://www.youtube.com/watch?v=Hb4fzFk4U-s', { format: 'audioonly' })
  let dispatcher = connection.playStream(stream, { volume: 1 });

  dispatcher.once('end', (r) => {
    play(connection);
  })

  Dispatch.dispatcher = dispatcher;
}

  message.member.voiceChannel.join().then(connection => {
  play(connection);
  
  let Dispatch = {
    connection: connection,
    msg: msg
  }

  Dispatchers.set(message.guild.id, Dispatch);
})

Further details:

  • discord.js version: 11.3.2

  • node.js version: v9.8.0

  • Operating system: debian 8.8 Jessie

  • ffmpeg version: 2.6.9

  • Priority this issue should have – please be realistic and elaborate if possible: low/medium

  • [x ] I found this issue while running code on a full privileged account

  • I have also tested the issue on latest master, commit hash:

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 23 (8 by maintainers)

Commits related to this issue

Most upvoted comments

That’s what discord is for 😐