summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--commands/itemshop.js8
-rw-r--r--commands/reboot.js8
2 files changed, 11 insertions, 5 deletions
diff --git a/commands/itemshop.js b/commands/itemshop.js
index 838d4f4..b05cb2c 100644
--- a/commands/itemshop.js
+++ b/commands/itemshop.js
@@ -2,6 +2,7 @@ const ytdl = require('ytdl-core');
module.exports = {
name: 'itemshop',
+ aliases: ['is'],
description: '',
async execute(msg, args, bot) {
if (msg.member.voiceChannel && !msg.guild.voiceConnection) {
@@ -12,14 +13,13 @@ module.exports = {
const dispatcher = connection.playStream(stream, {
volume: 0.5
});
-
+
+ // dispatcher.time >= 6000
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');
+ voice_check_dialog.execute(msg);
}
}
}; \ No newline at end of file
diff --git a/commands/reboot.js b/commands/reboot.js
index 950da3b..b4eb7f6 100644
--- a/commands/reboot.js
+++ b/commands/reboot.js
@@ -1,3 +1,5 @@
+const bvc = require('../utils/bot_voice_check.js');
+
module.exports = {
name: 'reboot',
aliases: ['r', 're'],
@@ -6,10 +8,14 @@ module.exports = {
if (args[0] == 'voice' || args[0] == 'v') {
if (!msg.member.voiceChannel) {
msg.reply('you need to be in a voice channel to reboot the voice module');
- } else {
+ } else if (!bvc.execute(msg)) {
msg.member.voiceChannel.join();
msg.member.voiceChannel.leave();
msg.reply('voice module reboot finished lol');
+ } else if (bvc.execute(msg)) {
+ msg.member.voiceChannel.leave();
+ msg.member.voiceChannel.join();
+ msg.reply('voice module reboot finished lol');
}
} else if (args[0] == 'commands' || args[0] == 'commands' || args[0] == 'cmds' || args[0] == 'cmd' || args[0] == 'c') {
msg.reply('commands module reboot finished lol');