summaryrefslogtreecommitdiff
path: root/src/commands/voice/wahoo.js
diff options
context:
space:
mode:
author8cy <[email protected]>2020-04-13 05:32:35 -0700
committer8cy <[email protected]>2020-04-13 05:32:35 -0700
commit9dff52f7d047c905326bc2f476ede5463e00f2a0 (patch)
tree1fec8563b3b72fde9b2ab7ad9e56a97398798685 /src/commands/voice/wahoo.js
parenttypescript (diff)
downloads5nical-9dff52f7d047c905326bc2f476ede5463e00f2a0.tar.xz
s5nical-9dff52f7d047c905326bc2f476ede5463e00f2a0.zip
typescript final
Diffstat (limited to 'src/commands/voice/wahoo.js')
-rw-r--r--src/commands/voice/wahoo.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/commands/voice/wahoo.js b/src/commands/voice/wahoo.js
new file mode 100644
index 0000000..a791795
--- /dev/null
+++ b/src/commands/voice/wahoo.js
@@ -0,0 +1,30 @@
+const { Command } = require('discord.js-commando');
+const emoji = require('emoji-random');
+
+module.exports = class WahooVoice extends Command {
+ constructor(client) {
+ super(client, {
+ name: 'wahoo',
+ aliases: ['mario'],
+ group: 'voice',
+ memberName: 'wahoo',
+ description: 'wahoo',
+ guildOnly: true,
+ examples: ['s5n!wahoo', 's5n!mario']
+ });
+ }
+ 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 ' + emoji.random());
+ } else {
+ msg.reply('you need to join a voice channel first silly ' + emoji.random());
+ }
+ }
+}; \ No newline at end of file