args = args.splice(1);
switch(cmd) {
// !kick
case 'kick':
bot.sendMessage({
to: channelID,
message: });
//Then get the audio context
bot.getAudioContext(botChannelID, function(error, stream) {
if (error) return console.error(error);
//Create a stream to your file and pipe it to the stream
//Without {end: false}, it would close up the stream, so make sure to include that.
fs.createReadStream('voiceOriginal.mp4').pipe(stream, {end: false});
//The stream fires `done` when it's got nothing else to send to Discord.
stream.on('done', function() {
//Handle
});
});
bot.moveUserTo(serverID, randomUser, hellID, ["I Can't Move You There!"]);
break;
case 'help':
bot.sendMessage({
to: channelID,
message:
});
break;
case 'comeHere':
bot.sendMessage({
to: channelID,
message:
});
bot.joinVoiceChannel(botChannelID, ["You must be in this Channel to use !kick"]);
break;
case 'goAway':
bot.sendMessage({
to: channelID,
message:
});
bot.leaveVoiceChannel(botChannelID);
break;
case 'move':
bot.moveUserTo(serverID, randomUser, hellID, ["I Can't Move You There!"]);
break;
}
}});