summaryrefslogtreecommitdiff
path: root/commands/abee.js
blob: c665b12436ae15160b29fd0dc37c40f69650b0c8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
module.exports = {
    name: 'abee',
    aliases: ['a-bee'],
    description: '',
    async execute(msg) {
        if (msg.member.voiceChannel && !msg.guild.voiceConnection) {
            const connection = await msg.member.voiceChannel.join();
            const dispatcher = connection.playFile('./assets/audio/mario_on_a_bike.mp3', {
                volume: 0.5
            });

            dispatcher.on('end', () => {
                msg.member.voiceChannel.leave();
            });
        } else if (msg.guild.voiceConnection) {
            msg.reply('i\'m already playing that lol');
        } else {
            msg.reply('you need to join a voice channel first silly');
        }
    }
}