Closed saom88n closed 1 year ago
You are using JSON.parse on the end reason but is it is a string
@PondWader Yea it is a string, if I add log with
typeof
its always a string.
also in server console I see lost connection: Timed out
That's the reason you're getting that error because you are trying to parse a string which isn't in JSON format as JSON
@PondWader even without this JSON parse I have the same error.
The problem was on 65 line with 'end'
, I should put 'kicked'
instead
Versions
Detailed description of a problem
I`m trying to create bot, that will connect and just stay afk. Server have restarts at 00 04, 10, 16, 20. Im trying to catch it and go throw antibot system.
What did you try yet?
Restart Mac, try on another server.
Your current code
Expected behavior
Connect to the server, go throw antibot (reconnect 3 times with random interval, stay afk and wait for restart, leave and connect after 4 minutes)
Additional context