diff options
| author | s1n <[email protected]> | 2020-04-07 10:40:25 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-04-07 10:40:25 -0700 |
| commit | 67e11c6747ea02b61d1b0604cf650ed03f294e01 (patch) | |
| tree | 67f050cc81dea4b9b21f0d0349ecbdb263ecf221 /commands/fart.js | |
| parent | add yt test, 1.3.0 (diff) | |
| parent | final test push before master (diff) | |
| download | s5nical-67e11c6747ea02b61d1b0604cf650ed03f294e01.tar.xz s5nical-67e11c6747ea02b61d1b0604cf650ed03f294e01.zip | |
Merge pull request #1 from 8cy/test
major codebase refactor, v1.3.0
Diffstat (limited to 'commands/fart.js')
| -rw-r--r-- | commands/fart.js | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/commands/fart.js b/commands/fart.js new file mode 100644 index 0000000..de62889 --- /dev/null +++ b/commands/fart.js @@ -0,0 +1,80 @@ +module.exports = { + name: 'fart', + description: '', + async execute(msg, args, bot) { + if (msg.member.voiceChannel && !msg.guild.voiceConnection) { + const connection = await msg.member.voiceChannel.join(); + var fartNum = Math.floor((Math.random() * 8) + 1); + + if (fartNum == 1) { + msg.reply('you got fart 1, courtesy of Sin'); + const dispatcher = connection.playFile('./assets/audio/farts/1.mp3', { + volume: 0.5 + }); + dispatcher.on('end', () => { + msg.member.voiceChannel.leave(); + }); + } else if (fartNum == 2) { + msg.reply('you got fart 2, courtesy of Sin'); + const dispatcher = connection.playFile('./assets/audio/farts/2.mp3', { + volume: 0.5 + }); + dispatcher.on('end', () => { + msg.member.voiceChannel.leave(); + }); + } else if (fartNum == 3) { + msg.reply('you got fart 3, courtesy of Sin'); + const dispatcher = connection.playFile('./assets/audio/farts/3.mp3', { + volume: 0.5 + }); + dispatcher.on('end', () => { + msg.member.voiceChannel.leave(); + }); + } else if (fartNum == 4) { + msg.reply('you got fart 4, courtesy of Sin'); + const dispatcher = connection.playFile('./assets/audio/farts/4.mp3', { + volume: 0.5 + }); + dispatcher.on('end', () => { + msg.member.voiceChannel.leave(); + }); + } else if (fartNum == 5) { + msg.reply('you got fart 5, courtesy of Sin'); + const dispatcher = connection.playFile('./assets/audio/farts/5.mp3', { + volume: 0.5 + }); + dispatcher.on('end', () => { + msg.member.voiceChannel.leave(); + }); + } else if (fartNum == 6) { + msg.reply('you got fart 6, courtesy of nick'); + const dispatcher = connection.playFile('./assets/audio/farts/6.mp3', { + volume: 0.5 + }); + dispatcher.on('end', () => { + msg.member.voiceChannel.leave(); + }); + } else if (fartNum == 7) { + msg.reply('you got fart 7, courtesy of nick'); + const dispatcher = connection.playFile('./assets/audio/farts/7.mp3', { + volume: 0.5 + }); + dispatcher.on('end', () => { + msg.member.voiceChannel.leave(); + }); + } else if (fartNum == 8) { + msg.reply('you got fart 8, courtesy of nick'); + const dispatcher = connection.playFile('./assets/audio/farts/8.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'); + } + } +};
\ No newline at end of file |