summaryrefslogtreecommitdiff
path: root/commands/voice/wahoo.js
diff options
context:
space:
mode:
Diffstat (limited to 'commands/voice/wahoo.js')
-rw-r--r--commands/voice/wahoo.js28
1 files changed, 28 insertions, 0 deletions
diff --git a/commands/voice/wahoo.js b/commands/voice/wahoo.js
new file mode 100644
index 0000000..d89dfe3
--- /dev/null
+++ b/commands/voice/wahoo.js
@@ -0,0 +1,28 @@
+const { Command } = require('discord.js-commando');
+
+module.exports = class WahooVoice extends Command {
+ constructor(client) {
+ super(client, {
+ name: 'wahoo',
+ aliases: ['mario'],
+ group: 'voice',
+ memberName: 'wahoo',
+ description: 'wahoo',
+ guildOnly: true
+ });
+ }
+ async run(msg) {
+ if (msg.member.voice.channel && !msg.guild.voice) {
+ const connection = await msg.member.voice.channel.join();
+ const dispatcher = connection.play('./assets/audio/wahoo.mp3');
+
+ dispatcher.on('finish', () => {
+ connection.disconnect();
+ });
+ } else if (msg.guild.voice) {
+ msg.reply('i\'m already playing that lol');
+ } else {
+ msg.reply('you need to join a voice channel first silly');
+ }
+ }
+}; \ No newline at end of file