discord cloop fix

This commit is contained in:
ChomeNS 2022-10-29 16:50:33 +07:00
parent aefd3d374a
commit 6bcfaaf084

View file

@ -179,12 +179,12 @@ function main() {
console.log(`Disconnected from ${bot.options.host} (${event} event): ${util.inspect(reason)}`);
channel.send(`Disconnected: \`${util.inspect(reason)}\``);
const timeout = config.reconnectTimeout;
let timeout = config.reconnectTimeout;
try {
if (reason.text) {
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;
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;
}
} catch (e) {}