From aefd3d374a3ad83a38f865d9820297a6e9fc712c Mon Sep 17 00:00:00 2001 From: ChomeNS Date: Sat, 29 Oct 2022 16:49:51 +0700 Subject: [PATCH] discord cloop fix + 7 secs reconnect interval --- commands/cloop.js | 2 +- index.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/cloop.js b/commands/cloop.js index d3fd8fe..7e238b8 100644 --- a/commands/cloop.js +++ b/commands/cloop.js @@ -108,7 +108,7 @@ module.exports = { if (args[0]==='add') { if (message.member.roles.cache.some((role) => role.name === 'Trusted')) { if (args[2]) { - if (!Number(args[1])) throw new SyntaxError('Invalid interval'); + if (!Number(args[1]) && Number(args[1]) !== 0) throw new SyntaxError('Invalid interval'); add(args.slice(2).join(' '), args[1], bot); const Embed = new MessageEmbed() .setColor('#FFFF00') diff --git a/index.js b/index.js index 451c48e..b73be04 100644 --- a/index.js +++ b/index.js @@ -183,8 +183,8 @@ function main() { try { if (reason.text) { - if (reason.text === 'Wait 5 seconds before connecting, thanks! :)') timeout = 1000 * 6; - if (reason.text === 'You are logging in too fast, try again later.') timeout = 1000 * 6; + if (reason.text === 'Wait 5 seconds before connecting, thanks! :)') timeout = 1000 * 7; + if (reason.text === 'You are logging in too fast, try again later.') timeout = 1000 * 7; } } catch (e) {}