discordjs / discord.js

A powerful JavaScript library for interacting with the Discord API
https://discord.js.org
Apache License 2.0
25.49k stars 3.97k forks source link

Playing music/videos via ytdl broken #2318

Closed SyndicateDiscord closed 6 years ago

SyndicateDiscord commented 6 years ago

Running this code (it's from your website) does not play the music on our bot. There are no errors displayed, and the bot sits idly in the voice channel playing nothing. I don't know if this is a known bug or a new one, but can someone try to find a way to fix this?

const ytdl = require('ytdl-core');
const streamOptions = { seek: 0, volume: 1 };
voiceChannel.join()
  .then(connection => {
    const stream = ytdl('https://www.youtube.com/watch?v=XAWgeLF9EVQ', { filter : 'audioonly' });
    const dispatcher = connection.playStream(stream, streamOptions);
  })
  .catch(console.error);

Further details:

Bacon1661 commented 6 years ago

Can reproduce

iCrawl commented 6 years ago

Opussscript or node-opus? ffmpeg version?

DevYukine commented 6 years ago

you should have asked on our Discord Server since there are some common issues with difference sources like a new npm bug or issue with dependencies. so please instead asking here move to our discord server for support.