so i'm triyng to make the bot play a mp3 file that i got on local. so far i have this code
var Discord = require("discord.js");
var bot = new Discord.Client();
bot.on('ready', function() {
var channel = bot.servers.get('name', 'Social Life is For N00bS').channels.get('name', 'Osu');
bot.joinVoiceChannel(channel, function(error) {
console.log(error.message);
});
});
bot.on("message", function(message) {
if(message.content[0] == '!') { // Command issued
console.log("test VoiceConnection");
bot.voiceConnection.playFile('/root/test.mp3');
}
});
bot.login("email", "passwd");
but i cant make it to work. ive tried both on the master and indev branch and i have also tried using a stream (fs.readFile) with playStream but still no luck.
i'm on Debiam v7 with node v5.5.0, maybe it's a node version problem?
so i'm triyng to make the bot play a mp3 file that i got on local. so far i have this code
but i cant make it to work. ive tried both on the master and indev branch and i have also tried using a stream (fs.readFile) with playStream but still no luck. i'm on Debiam v7 with node v5.5.0, maybe it's a node version problem?