Skip to content

bot.js #3848

@ilyas1234454

Description

@ilyas1234454

const mineflayer = require('mineflayer')

function createBot(name) {
const bot = mineflayer.createBot({
host: 'gavi-7x.aternos.me:',
port: 59676,
username: name
})

bot.on('spawn', () => {
console.log(name + ' joined the server')
})

bot.on('chat', (username, message) => {
if (message === 'hello') {
bot.chat('hi')
}
})
}

for (let i = 1; i <= 10; i++) {
createBot('Bot' + i)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stage1just created by someone new to the project, we don't know yet if it deserves an implementation / a fpossible bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions