This is a very basic bot made using Mineflayer
First install Node.js >= 18 from nodejs.org then:
npm install mineflayer
Then go to the Config File and configurate the following to fit your needs.
- Username
- The email of your microsoft account or the username of an account for an offline/cracked server or locally hosted worlds.
- Password
- The password of your microsoft account or the password of an account for an offline/cracked server or locally hosted worlds.
- Server
- The ip of the server you want your bot to join. For local hosting, use
localhost
.
- The ip of the server you want your bot to join. For local hosting, use
- Port
- The port of the server you're attempting to join, the default port is
25565
. For locally hosted worlds, change the port to the port that has been given after opening to LAN.
- The port of the server you're attempting to join, the default port is
- Version
- The version of minecraft the server is running.
- Auth
microsoft
oroffline
- Prefix
- The prefix to the commands for your bot. The default is
$
.
- The prefix to the commands for your bot. The default is
After setting up the Config File make sure the Index File is in a folder with your Commands Folder and your Config File.
Run the Index File and enjoy!
If you have any questions feel free to dm me on Discord