summaryrefslogtreecommitdiff
path: root/commands/fart.js
diff options
context:
space:
mode:
author8cy <[email protected]>2020-04-08 20:02:33 -0700
committer8cy <[email protected]>2020-04-08 20:02:33 -0700
commit419467085d42d47f270e5ee1dda8676134e66c41 (patch)
tree0da5c310931e8598a5e0bb881d9dbaeea28f42eb /commands/fart.js
parentfix uptime, v1.4.3 (diff)
downloads5nical-419467085d42d47f270e5ee1dda8676134e66c41.tar.xz
s5nical-419467085d42d47f270e5ee1dda8676134e66c41.zip
big changes, v1.5.0
- add utils - add fun commands - alter some commands - optimizations
Diffstat (limited to 'commands/fart.js')
-rw-r--r--commands/fart.js23
1 files changed, 19 insertions, 4 deletions
diff --git a/commands/fart.js b/commands/fart.js
index de62889..d2fbeb5 100644
--- a/commands/fart.js
+++ b/commands/fart.js
@@ -1,8 +1,25 @@
+const voice_check_dialog = require('../utils/voice_check_dialog.js');
+const bot_voice_check = require('../utils/bot_voice_check.js');
+
module.exports = {
name: 'fart',
+ aliases: ['f'],
description: '',
async execute(msg, args, bot) {
- if (msg.member.voiceChannel && !msg.guild.voiceConnection) {
+ if (args[0] == 'long' || args[0] == 'longest' || args[0] == 'l') {
+ if (msg.member.voiceChannel && !msg.guild.voiceConnection) {
+ const connection = await msg.member.voiceChannel.join();
+ const dispatcher = connection.playFile('./assets/audio/longest_fart_ever.mp3', {
+ volume: 1.0
+ });
+
+ dispatcher.on('end', () => {
+ msg.member.voiceChannel.leave();
+ });
+ } else {
+ voice_check_dialog.execute(msg);
+ }
+ } else if (msg.member.voiceChannel && !msg.guild.voiceConnection) {
const connection = await msg.member.voiceChannel.join();
var fartNum = Math.floor((Math.random() * 8) + 1);
@@ -71,10 +88,8 @@ module.exports = {
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');
+ voice_check_dialog.execute(msg);
}
}
}; \ No newline at end of file