blob: 03824e35de443b2137dd2eda54d167c4eace671e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
const { Command } = require('discord.js-commando');
const emoji = require('emoji-random');
module.exports = class MoanVoice extends Command {
constructor(client) {
super(client, {
name: 'moan',
aliases: ['uhhhh'],
group: 'voice',
memberName: 'moan',
description: 'uhhhh',
guildOnly: true,
examples: ['s5n!moan', 's5n!uhhhh']
});
}
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/uhhhh.wav');
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());
}
}
};
|