mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-14 10:44:55 -05:00
change reconnectect timeout and readd reason check
This commit is contained in:
parent
99e28d5360
commit
40113fc0d8
2 changed files with 7 additions and 9 deletions
|
@ -14,7 +14,7 @@ module.exports = {
|
|||
'eval': {
|
||||
'serverUrl': 'http://192.168.1.105:4445/',
|
||||
},
|
||||
'reconnectTimeout': 1000 * 6,
|
||||
'reconnectTimeout': 1000 * 2,
|
||||
'discord': {
|
||||
'token': 'OTcxNjUwNDU2NzA5Mzk4NTY5.G3lKC2._XQNTTU1Jqmaam_A0JKSe93GP1vFZvDpiXqZzA',
|
||||
'servers': {
|
||||
|
|
14
index.js
14
index.js
|
@ -217,14 +217,12 @@ function main() {
|
|||
|
||||
const timeout = config.reconnectTimeout;
|
||||
|
||||
// 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;
|
||||
// }
|
||||
// } catch (e) {
|
||||
// console.log(e.message);
|
||||
// }
|
||||
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;
|
||||
}
|
||||
} catch (e) {}
|
||||
|
||||
try {
|
||||
clearInterval(notonline);
|
||||
|
|
Loading…
Reference in a new issue