Discord Js playRawStream Error: spawn help ENOENT
See original GitHub issueI 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:
- Created 7 years ago
- Comments:11 (6 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Okay it’s working nice with youtube-audio-stream package. Thanks a lot for help 😃
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.