summaryrefslogtreecommitdiff
path: root/commands/reboot.js
diff options
context:
space:
mode:
Diffstat (limited to 'commands/reboot.js')
-rw-r--r--commands/reboot.js8
1 files changed, 7 insertions, 1 deletions
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');