From 9417a785dedfa6e4842834899456e01dd800aa24 Mon Sep 17 00:00:00 2001 From: 4Parker02991 <4parker02991@noreply.localhost> Date: Fri, 12 Jan 2024 12:28:02 -0500 Subject: [PATCH] Delete .bot.js.2274242318~ what the fard??? --- .bot.js.2274242318~ | 75 --------------------------------------------- 1 file changed, 75 deletions(-) delete mode 100644 .bot.js.2274242318~ diff --git a/.bot.js.2274242318~ b/.bot.js.2274242318~ deleted file mode 100644 index b49c522..0000000 --- a/.bot.js.2274242318~ +++ /dev/null @@ -1,75 +0,0 @@ -const mc = require('minecraft-protocol') -const { EventEmitter } = require('node:events') -const fs = require('fs') -const path = require('path') -const util = require('node:util') - - function createBot(options = {}) { - const bot = new EventEmitter() -const rs = require('randomstring') - // Set some default values in options - let r = Math.floor(Math.random() * 255) + 1; - options.host ??= 'localhost' - options.username ??= 'Player' + Math.floor(Math.random() * 1000) - options.hideErrors ??= false // HACK: Hide errors by default as a lazy fix to console being spammed with them - - bot.options = options - - // Create our client object, put it on the bot, and register some events - bot.on('init_client', client => { - client.on('packet', (data, meta) => { - bot.emit('packet', data, meta) - bot.emit('packet.' + meta.name, data) - }) - - client.on('login', async function (data) { - - bot.uuid = client.uuid - bot.username = client.username - bot.entityId = data.entityId - bot.host = bot.options.host - bot.port = bot.options.port - bot.buildstring = process.env['buildstring'] - bot.fbs = process.env['FoundationBuildString'] - }) - - client.on('end', reason => { bot.emit('end', reason) - try { - if (reason.text) { - if - } - } - })if - - client.on('error', error => bot.emit('error', error), ) - - }) - -const buildstring = process.env['buildstring'] - - const client = options.client ?? mc.createClient(options) - bot._client = client - bot.emit('init_client', client) - - bot.bots = options.bots ?? [bot] - - // Modules - bot.loadModule = module => module(bot, options) - - for (const filename of fs.readdirSync(path.join(__dirname, 'modules'))) { - try { - const module = require(path.join(__dirname, 'modules', filename)) - bot.loadModule(module) - } catch (error) { - - console.error('\x1b[0m\x1b[91m[ERROR]: \x1b[0m\x1b[90mFailed to load module', filename, ':', error) - - } - } - - return bot -} - -// ABot username function mabe mabe - -module.exports = createBot