LookAtMySuitBot/bot.js

22 lines
540 B
JavaScript
Raw Permalink Normal View History

2023-11-25 16:41:23 -05:00
const mineflayer = require('mineflayer')
const fs = require('fs');
global.bot = null
module.exports = {
get: function(){
return global.bot
},
create: function(){
const data = fs.readFileSync('.env').toString();
const sp = data.split('\n')
global.bot = mineflayer.createBot({
host: 'g8FtmrY8VbkBzbgN5fsDu8QxYW8Nubkd.tpgc.me',
port: 25565,
auth: 'microsoft',
username: sp[0],
password: sp[1]
})
return global.bot
}
}