diff options
| author | 8cy <[email protected]> | 2020-04-09 20:01:57 -0700 |
|---|---|---|
| committer | 8cy <[email protected]> | 2020-04-09 20:01:57 -0700 |
| commit | 98ecf06af59de1b9d98741726d4d067e93dd049b (patch) | |
| tree | 0c0f2986cf8cc21073acb805821664e3427950d1 | |
| parent | voice check stuff, v1.5.1 (diff) | |
| download | s5nical-legacy-11.6.3.tar.xz s5nical-legacy-11.6.3.zip | |
rework reboot, work on itemshop, v1.5.2legacy-11.6.3
| -rw-r--r-- | commands/itemshop.js | 8 | ||||
| -rw-r--r-- | commands/reboot.js | 8 |
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'); |