Open AdolfRoxler opened 2 years ago
Did some testing, every instance involved in the same loop will get kicked if it goes over 5 (??? why)
Also, how do I prevent clients from timing out?
Are you waiting between creating each bot? Your code isn't really well formatted
Are you waiting between creating each bot? Your code isn't really well formatted
I eventually just set a higher delay to 4500ms for bigger bot counts and there's no more bullshit disconnections.
This is a snippet, of course, this'll prompt you hoe many bots do you want to generate, the delay in between joins and if you want to use a common profile for eac one.
I'm not very fluid in js (in fact, I hate it, it's just mediocre at everything without any redeeming qualities with unnecessarily weird and badly documented syntax like it's c++ while being a wannabe C), I come from coding in lua.
Versions
Detailed description of a problem
A clear and concise description of what the problem is, with as much context as possible. What are you building? What problem are you trying to solve?
I'm trying to get an arbitrary amount of bots inside of a server. The maximum that will go in is 7 before all of them mysteriously disconnect.
What did you try yet?
See if my way of handling requests is bad. I don't see anything bad here.
If I do it separately outside a loop everything seems to work out fine.
Did you try any method from the API? mineflayer.createBot(), bot.on(), Did you try any example? Any error from those?
Your current code
Expected behavior
A clear and concise description of what you expected to happen. If I input to generate 20 bots, it should generate 20 bots with the same prefix (with diff numbers) without any leaving.
Additional context
Add any other context about the problem here.