question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Discord Js playRawStream Error: spawn help ENOENT

See original GitHub issue

I try to use the playRawStream function but it doesn’t working. I found this code on another post around here. Could you explain me what is wrong here ?

        var chaine = msg.content.split(" ");
        bot.joinVoiceChannel(bot.channels.get("name", "Général").id).then(function(r){
        }).catch(function(error){
            console.log(error);
        });

        if (bot.internal.voiceConnection) {
            var connection = bot.internal.voiceConnection;
            var request = require("request");
            var url = chaine[1];
            var stream = request(url);
            connection.playRawStream(stream).then(intent => {
                bot.reply(m, "playing!").then((msg) => {
                    intent.on("end", () => {
                        bot.updateMessage(msg, "that song has finished now.");
                    });
                }).catch(error);
            }).catch(error); //error is a function who show errors on the console
        }

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
MilowBcommented, Aug 30, 2016

Okay it’s working nice with youtube-audio-stream package. Thanks a lot for help 😃

0reactions
appellationcommented, Aug 30, 2016

Oh, if you’re looking for a YouTube audio stream, check out this package. https://www.npmjs.com/package/youtube-audio-stream

After doing some testing, it seems that there aren’t any errors if the stream URL isn’t actually an audio stream. This could be your problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Errors - discord.js Guide
# code ENOENT... syscall spawn git. This error is commonly thrown by your system due to it not finding git . You need...
Read more >
Error: ENOENT: no such file or directory, scandir discord bot
I am new to making discord bots but I ...
Read more >
@discordjs/ws - npm
Start using @discordjs/ws in your project by running `npm i @discordjs/ws`. ... DISCORD_TOKEN); // This example will spawn Discord's recommended shard count ...
Read more >
VoiceConnection — discord.js 7.0.1 documentation
js currently supports sending audio data over Discord voice chat. A voice connection can be initiated using client.joinVoiceChannel and then later accessed ...
Read more >
discord javascript error enoent
discord javascript error enoent,Error: ENOENT: no such file or directory - Glitch Support,const { Client, Collection, Intents } = require('discord.js'); ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found