-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
bot.js #3848
Copy link
Copy link
Open
Labels
Stage1just created by someone new to the project, we don't know yet if it deserves an implementation / a fjust created by someone new to the project, we don't know yet if it deserves an implementation / a fpossible bug
Metadata
Metadata
Assignees
Labels
Stage1just created by someone new to the project, we don't know yet if it deserves an implementation / a fjust created by someone new to the project, we don't know yet if it deserves an implementation / a fpossible bug
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)
}