Im coding a discord bot, and now it should play music, but if i run the command, it says "ffmpeg not found",i already installed ffmpeg as programm and in the console, here is the code:
if (message.content.startsWith === `${prefix}play`) {
const ytdl = require('ytdl-core');
const streamOptions = {
seek: 0,
volume: 1
};
const broadcast = bot.createVoiceBroadcast();
var link = arg1
bot.voiceChannel.join()
.then(connection => {
const stream = ytdl(arg1, {
filter: 'audioonly'
});
broadcast.playStream(stream);
const dispatcher = connection.playBroadcast(broadcast);
})
.catch(console.error);