added voice - airhorn command

This commit is contained in:
2017-12-18 02:46:28 -06:00
parent 3b7e31835d
commit abfaa7dc78
2 changed files with 29 additions and 1 deletions

30
bot.js
View File

@@ -254,7 +254,35 @@ client.on('message', message => {
break; break;
case 'yuri': case 'yuri':
message.channel.send(imgurRequest('yuri', 5)); message.channel.send(imgurRequest('yuri', 5));
break; break;
// Voice commands
case 'join':
message.member.voiceChannel.join();
break;
case 'leave':
message.member.voiceChannel.leave();
break;
case 'quiethorn':
message.member.voiceChannel.join().then(connection => {
const dispatcher = connection.playFile('voice/mlg-airhorn.mp3');
dispatcher.on('end', () => {
message.member.voiceChannel.leave();
});
dispatcher.setVolume(0.01);
});
break;
case 'airhorn':
message.member.voiceChannel.join().then(connection => {
const dispatcher = connection.playFile('voice/mlg-airhorn.mp3');
dispatcher.on('end', () => {
message.member.voiceChannel.leave();
});
dispatcher.setVolume(0.25);
});
break;
} }
} }

BIN
voice/mlg-airhorn.mp3 Normal file

Binary file not shown.