Jump to content
  • 0

I need help making a mineflayer bot to join my server


Patsteaks123

Question

3 answers to this question

Recommended Posts

  • 0
1 hour ago, Patsteaks123 said:

I've been looking at how to make a mineflayer bot for days and nothing has worked, any ideas on how to make it work?

Hey, I wouldn't judge your intentions on using this, but here is a small code I've made. And I also assume you have all the required stuff such as Mineflayer. Please make sure to read the note I've left below in this post.

// Importing
const mineflayer = require('mineflayer')

// Your server name
const name = 'server-name';

// Minecraft account credentials
const email = 'someone@example.com';
const password = 'secure-password';

// Create your bot, with connection information.
const bot = mineflayer.createBot({
    host: `${name}.minehut.gg`,
    port: 25565,
    username: email,
    password: password,
    version: '1.16.5'
})

// Bot login event (fired as soon as the bot joins the server)
bot.on('login', () => {
    // Send a message in chat after the bot joins
    bot.chat("Beep boop, I'm a bot :3")
    // Console message
    console.log("Bot has connected to the server")
})

Important Note: This risks your Minehut account and/or your server if you intend to use this for boosting your server's player count. Using bots to boost your server is a punishable offense (https://minehut.com/rules/). Use this at your own risk, you've been warned.

Edited by CoolProgrammer
  • Like 1

Hello there! If you're reading this, hope you're having a wonderful day!

 

Feel free to contact me via Discord (CoolProgrammer#1920) for any help.

My DMs are always open for help.

You can also message via. forum messages for help.

1604908226_ScreenShot2021-01-28at10_32_28AM.png.2646ad6be239a9d0756a99e8e15602ab.png

Also, don't hesitate to leave a like on my post if I helped you in any way.

Link to comment
Share on other sites

  • 0
12 hours ago, Patsteaks123 said:

The thing is that I'm still confused on how to make it work it encounters 21 errors

By "encounters 21 errors" I think you used Skript for this which you can't you actually need to setup the bot outside of Mminecraft with JS (java-script) with something like visual studio.

tumblr_lqahoaPLkC1ql1l0v.gif

Feel free to add me on discord if you:

dc3456c-e0ec58e8-c807-43e3-b986-5224b91a need help with plugins

dc3456c-e0ec58e8-c807-43e3-b986-5224b91a need help with skripts

dc3456c-e0ec58e8-c807-43e3-b986-5224b91a need to vent about something

tumblr_lqahoaPLkC1ql1l0v.gif

>[ ‧₊˚꒰ʚ Starshine ɞ ‧✦ *#2683 ]<

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...