PrismarineJS / mineflayer

Create Minecraft bots with a powerful, stable, and high level JavaScript API.
https://prismarinejs.github.io/mineflayer/
MIT License
4.92k stars 904 forks source link

add an optional connect method to the bot. (ratelimiting) #2226

Closed ClientCrash closed 2 years ago

ClientCrash commented 3 years ago

Is your feature request related to a problem? Please describe.

Describe the solution you'd like

Describe alternatives you've considered

I have considered the alternative in #975 but this doesnt work without creating a bot (and signing in again) every time you want to reconnect.

Coding information

The connect method could take a json object with host and port, like createBot but only with this 2 arguments. bot.connect({host:'hypixel.net',port:25565})

u9g commented 3 years ago

make a token with yggdrasil, then auth the first bot with that token and any consecutive bot with the aame token

ClientCrash commented 3 years ago

make a token with yggdrasil, then auth the first bot with that token and any consecutive bot with the aame token

I will try this thank you. But i still believe adding a connect method will make the bot much more easy to use in the future. This will also prevent many issues on github and many workarounds. I think this library is intended to make bot development easy @u9g