My bot can join the voice channel successfully, but when I attempt to play audio, I encounter multiple errors indicating that I am missing certain modules [@discordjs/opus, node-opus, opusscript]. Although I have installed these modules, I am unsure of what requires it [const ??? = require('@discordjs/opus');]. Here is the code snippet and error message:
run: async (bot, message, args) => {
var VC = message.member.voice.channel;
if (!VC)
return message.reply("Please connect to a voice channel first")
VC.join()
.then(connection => {
const dispatcher = connection.play('../../Database/Music/Sheep sounds.mp3');
dispatcher.on("end", end => {VC.leave()});
})
.catch(console.error);
}