FNFBoyfriendBot v5.0.4 Build:340

This commit is contained in:
4Parker02991 2024-01-12 17:24:01 +00:00
parent ba184e0019
commit 0b49eb1e4f
51 changed files with 2103 additions and 1697 deletions

147
.bot.js.3332916295~ Normal file
View file

@ -0,0 +1,147 @@
const mc = require("minecraft-protocol");
const { EventEmitter } = require("node:events");
const fs = require("fs");
const path = require("path");
const util = require("node:util");
console.log(`Starting ${process.env["buildstring"]} .......`);
console.log(`Foundation: ${process.env["FoundationBuildString"]}`);
console.log("this may take a few moments....");
require("events").EventEmitter.defaultMaxListeners = 30;
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 ??= "FNFBoyfriendBot";
options.hideErrors ??= false; // HACK: Hide errors by default as a lazy fix to console being spammed with them
options.console ??= true;
options.input ??= true;
options.commands.MainPrefix ??= "~";
options.commands.SecondaryPrefix ??= "%";
options.commands.TertiaryPrefix ??= "&";
options.selfcare.unmuted ??= true;
options.selfcare.vanished ??= true;
options.selfcare.prefix ??= true;
options.selfcare.skin ??= true;
options.selfcare.cspy ??= true;
options.selfcare.op ??= true;
options.selfcare.gmc ??= true;
options.selfcare.interval ??= 500;
options.selfcare.username ??= true;
options.selfcare.nickname ??= true;
options.selfcare.god ??= true;
options.selfcare.tptoggle ??= true;
options.discord.commandPrefix ??= "~";
options.reconnectDelay ??= 1000;
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"];
bot.version = bot.options.version;
console.log(`Username: ${bot.options.username}`);
console.log(`Host: ${bot.options.host}:${bot.options.port}`);
console.log(`Minecraft java version: ${bot.options.version}`);
/* console.log(`Username: ${bot.username}`)
console.log(`Host: ${bot.host}:${bot.port}`)
console.log(`Minecraft java version: ${bot.version}`)*/
});
//reason, fullReason
client.on("end", (reason) => {
bot.emit("end", reason);
console.log(reason);
});
client.on("disconnect", (reason) => {
bot.emit("disconnect", reason);
console.log(reason);
});
client.on("kick_disconnect", (reason) => {
bot.emit("kick_disconnect", reason);
console.log(reason);
});
client.on("keep_alive", ({ keepAliveId }) => {
bot.emit("keep_alive", { keepAliveId });
// console.log(keepAliveId)
});
client.on("error", (error) => bot.emit("error", error));
//client.end(reason, fullReason)
});
/*
bot._client.on('kick_disconnect', (data) => {
const parsed = JSON.parse(data.reason)
bot.end(parsed, 'kick_disconnect')
})
*/
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];
//bot.setMaxListeners(Infinity)
//bot._client.setMaxListeners(Infinity)
// 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);
//console.log(filename.length);
} catch (error) {
console.error(
"\x1b[0m\x1b[91m[ERROR]: \x1b[0m\x1b[90mFailed to load module",
filename,
":",
error,
);
}
}
return bot;
} //path.join(__dirname, 'modules', filename)
//path.join(amonger + 'FridayNightFunkinBoyfriendBot') !== path.join(amonger)
//fs.stat
const amonger = "../";
if (fs.existsSync("../FridayNightFunkinBoyfriendBot") == false) {
process.exit(1);
}
//path.join('') != fs. existsSync('~/FridayNightFunkinBoyfriendBot/index.js')
// ABot username function mabe mabe
module.exports = createBot;

74
.index.js.3066437094~ Normal file
View file

@ -0,0 +1,74 @@
const util = require('util')
const createBot = require('./bot.js')
//const chomensjs = require('./ChomensJS')
// TODO: Load a default config
const fs = require('fs/promises')
const fileExist = require('./util/file-exists')
const path = require('path')
function load () {
//const config = require('./config.js')
const readline = require('readline')
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
})
require('dotenv').config()
const bots = []
for (const options of config.bots) {
const bot = createBot(options)
bots.push(bot)
bot.bots = bots
bot.options.username
bot.console.useReadlineInterface(rl)
// bot.on('error', (error), util.inspect(error))
try{
bot.on('error', console.error)
}catch(error){
console.log(error.stack)
}
}
}
async function checkConfig () {
if (!await fileExist(path.join(__dirname, 'config.js'))) {
console.error('Config not found! Creating a new Config from ')
await fs.copyFile(path.join(__dirname, 'default.js'), path.join(__dirname, 'config.js'))
} if (await fileExist(path.join(__dirname, 'config.js'))){
console.log('Config found! loading config please wait,......')
}
config = require('./config.js')
load()
}
checkConfig()
const modules = "./modules";
const util = "./util";
const CommandModules = "./CommandModules";
const commands = "./commands";
const chat = "./chat";
fs.readdir(util, (err, files) => {
console.log("Successfully loaded: " + files.length + " util files");
});
fs.readdir(modules, (err, files) => {
console.log("Successfully loaded: " + files.length + " module files");
});
fs.readdir(commands, (err, files) => {
console.log("Successfully loaded: " + files.length + " command files");
});
fs.readdir(CommandModules, (err, files) => {
console.log("Successfully loaded: " + files.length + " CommandModule files");
});
fs.readdir(chat, (err, files) => {
console.log("Successfully loaded: " + files.length + " chat files");
});
process.on('uncaughtException', (e) => {
console.log('uncaught ' + e.stack)
})

225
bot.js
View file

@ -1,176 +1,111 @@
const mc = require('minecraft-protocol') const mc = require("minecraft-protocol");
const { EventEmitter } = require('node:events') const { EventEmitter } = require("node:events");
const fs = require('fs') const fs = require("fs");
const path = require('path') const path = require("path");
const util = require('node:util') const util = require("node:util");
console.log(`Starting ${process.env["buildstring"]} .......`) console.log(`Starting ${process.env["buildstring"]} .......`);
console.log(`Foundation: ${process.env["FoundationBuildString"]}`) console.log(`Foundation: ${process.env["FoundationBuildString"]}`);
console.log('this may take a few moments....') console.log("this may take a few moments....");
require('events').EventEmitter.defaultMaxListeners = 20; require("events").EventEmitter.defaultMaxListeners = 30;
function createBot(options = {}) { function createBot(options = {}) {
const bot = new EventEmitter() const bot = new EventEmitter();
const rs = require('randomstring') const rs = require("randomstring");
// Set some default values in options // Set some default values in options
let r = Math.floor(Math.random() * 255) + 1; let r = Math.floor(Math.random() * 255) + 1;
options.host ??= 'localhost' options.host ??= "localhost";
options.username ??= 'FNFBoyfriendBot' options.username ??= "FNFBoyfriendBot";
options.hideErrors ??= false // HACK: Hide errors by default as a lazy fix to console being spammed with them options.hideErrors ??= false; // HACK: Hide errors by default as a lazy fix to console being spammed with them
options.console ??= true options.console ??= true;
options.input ??= true options.input ??= true;
//options.logger ??= true
// MainPrefix: "~",
// SecondaryPrefix:'%',
//TertiaryPrefix:'@'
options.commands.MainPrefix ??= '!' options.commands.MainPrefix ??= "~";
options.commands.SecondaryPrefix ??= '!' options.commands.SecondaryPrefix ??= "%";
options.commands.TertiaryPrefix ??= '!' options.commands.TertiaryPrefix ??= "&";
options.selfcare.unmuted ??= true options.selfcare.unmuted ??= true;
options.selfcare.vanished ??= true options.selfcare.vanished ??= true;
options.selfcare.prefix ??= true options.selfcare.prefix ??= true;
options.selfcare.skin ??= true options.selfcare.skin ??= true;
options.selfcare.cspy ??= true options.selfcare.cspy ??= true;
options.selfcare.op ??= true options.selfcare.op ??= true;
options.selfcare.gmc ??= true options.selfcare.gmc ??= true;
options.selfcare.interval ??= 500 options.selfcare.interval ??= 500;
options.Core.core ??= true options.selfcare.username ??= true;
options.selfcare.nickname ??= true;
options.selfcare.god ??= true;
options.discord.commandPrefix ??= '!' options.selfcare.tptoggle ??= true;
options.reconnectDelay ??= 1000 options.discord.commandPrefix ??= "~";
options.Core.customName ??= '@' options.reconnectDelay ??= 1000;
options.selfcare.username ??= true bot.options = options;
options.selfcare.nickname ??= true
options.selfcare.god ??= true
options.selfcare.tptoggle ??= true
bot.options = options
// Create our client object, put it on the bot, and register some events // Create our client object, put it on the bot, and register some events
bot.on('init_client', client => { bot.on("init_client", (client) => {
client.on('packet', (data, meta) => { client.on("packet", (data, meta) => {
bot.emit('packet', data, meta) bot.emit("packet", data, meta);
bot.emit('packet.' + meta.name, data) bot.emit("packet." + meta.name, data);
}) });
client.on('login', async function (data) { client.on("login", async function (data) {
bot.uuid = client.uuid;
bot.username = client.username;
bot.port = bot.options.port;
bot.version = bot.options.version;
console.log(`Username: ${bot.options.username}`);
console.log(`Host: ${bot.options.host}:${bot.options.port}`);
console.log(`Minecraft java version: ${bot.options.version}`);
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']
bot.version = bot.options.version
console.log(`Username: ${bot.options.username}`)
console.log(`Host: ${bot.options.host}:${bot.options.port}`)
console.log(`Minecraft java version: ${bot.options.version}`)
/* console.log(`Username: ${bot.username}`)
console.log(`Host: ${bot.host}:${bot.port}`)
console.log(`Minecraft java version: ${bot.version}`)*/
})
//reason, fullReason
client.on('end', reason => { bot.emit('end', reason)
console.log(reason)
}) client.on("end", (reason) => {
client.on('disconnect', reason => { bot.emit("end", reason);
bot.emit('disconnect', reason) console.log(reason);
console.log(reason) bot.cloop.clear()
}) bot.memusage.off()
});
client.on("disconnect", (reason) => {
bot.emit("disconnect", reason);
console.log(reason);
});
client.on('kick_disconnect', reason => { client.on("kick_disconnect", (reason) => {
bot.emit('kick_disconnect', reason) bot.emit("kick_disconnect", reason);
console.log(reason) console.log(reason);
}) });
client.on('keep_alive', ({ keepAliveId }) => { client.on("keep_alive", ({ keepAliveId }) => {
bot.emit('keep_alive', { keepAliveId }) bot.emit("keep_alive", { keepAliveId });
// console.log(keepAliveId) });
})
client.on('error', error => bot.emit('error', error), ) client.on("error", (error) => bot.emit("error", error));
});
//client.end(reason, fullReason)
}) const client = options.client ?? mc.createClient(options);
/* bot._client = client;
bot._client.on('kick_disconnect', (data) => { bot.emit("init_client", client);
const parsed = JSON.parse(data.reason)
bot.end(parsed, 'kick_disconnect')
})
*/ bot.bots = options.bots ?? [bot];
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]
//bot.setMaxListeners(Infinity)
//bot._client.setMaxListeners(Infinity)
// Modules
bot.loadModule = module => module(bot, options)
for (const filename of fs.readdirSync(path.join(__dirname, 'modules'))) { return bot;
try { }
const module = require(path.join(__dirname, 'modules', filename)) const amonger = "../";
bot.loadModule(module) if (fs.existsSync("../FridayNightFunkinBoyfriendBot") == false) {
//console.log(filename.length); process.exit(1);
} catch (error) { }
console.error('\x1b[0m\x1b[91m[ERROR]: \x1b[0m\x1b[90mFailed to load module', filename, ':', error) module.exports = createBot;
}
}
return bot
}//path.join(__dirname, 'modules', filename)
//path.join(amonger + 'FridayNightFunkinBoyfriendBot') !== path.join(amonger)
//fs.stat
const amonger = '../'
if (fs.existsSync('../FridayNightFunkinBoyfriendBot') == false) {
process.exit(1)
}
//path.join('') != fs. existsSync('~/FridayNightFunkinBoyfriendBot/index.js')
const modules = './modules';
const util2 = './util';
const CommandModules = './CommandModules';
const commands = './commands';
const chat = './chat'
fs.readdir(util2, (err, files) => {
console.log('Successfully loaded: ' + files.length + ' util files');
});
fs.readdir(modules, (err, files) => {
console.log('Successfully loaded: ' + files.length + ' module files');
});
fs.readdir(commands, (err, files) => {
console.log('Successfully loaded: ' + files.length + ' command files');
});
fs.readdir(CommandModules, (err, files) => {
console.log('Successfully loaded: ' + files.length + ' CommandModule files');
});
fs.readdir(chat, (err, files) => {
console.log('Successfully loaded: ' + files.length + ' chat files');
});
// ABot username function mabe mabe
module.exports = createBot

View file

@ -1,15 +0,0 @@
const CommandError = require('../CommandModules/command_error')
module.exports = {
name: 'botdevhistory',
description:['bots dev history'],
trustLevel: 0,
execute (context) {
const message = context.arguments.join(' ')
const bot = context.bot
var prefix = '&8&l&m[&4&mParker2991&8]&8&m[&b&mBOYFRIEND&8]&8&m[&b&mCONSOLE&8]&r '
bot.core.run('bcraw ' + prefix + 'Thank you for all that helped and contributed with the bot, it has been one hell of a ride with the bot hasnt it? From November 22, 2022 to now, 0.1 beta to 4.0 alpha, Mineflayer to Node-Minecraft-Protocol. I have enjoyed all the new people i have met throughout the development of the bot back to the days when the bot used mineflayer for most of its lifespan to the present as it now uses node-minecraft-protocol. Its about time for me to tell how development went in the bot well here it is, back in 0.1 beta of the bot it was skidded off of menbot 1.0 reason why? Well because LoginTimedout gave me the bot when ayunboom was still a thing and he helped throughout that time period bot and when 1.0 beta came around he he just stopped helping me on it why? because he had servers to run so yeah but anyway back then i didnt know what skidded like i do now so i thought i could get away with but i was wrong 💀. Early names considered for the bot were &6&lParkerBot &4&lDEMONBot &b&lWoomyBot &b&lBoyfriendBot,&r i kept the name &b&lBoyfriendBot&r throughout most of the early development but i got sick and tired of being harassed about the name being told it was gay but people really didnt know what it meant did they? It was referenced to Boyfriend from Friday Night Funkin so right around 1.0 released i renamed it to &b&lFNFBoyfriend&4&lBot &rand around 2.0 changed it to &5&lFNF&b&lBoyfriend&4&lBot &rand luckily avoided the harassment when i changed it i love coding and i want to learn how to code more thank you all!')
}
}

View file

@ -1,244 +1,306 @@
// TODO: Maybe add more authors // TODO: Maybe add more authors
const bots = [ const bots = [
{ {
name: { text: 'HBot', color: 'aqua', bold:false }, name: { text: "HBot", color: "aqua", bold: false },
authors: ['hhhzzzsss'], authors: ["hhhzzzsss"],
exclaimer:'HBOT HARRYBUTT LMAOOOOOOOOOOOOOOOOO', exclaimer: "HBOT HARRYBUTT LMAOOOOOOOOOOOOOOOOO",
foundation: 'java/mcprotocollib', foundation: "java/mcprotocollib",
prefixes: ['#'] prefixes: ["#"],
}, },
{ {
name: { text: '64Bot', color: 'gold', bold:false }, name: { text: "64Bot", color: "gold", bold: false },
authors: ['64Will64'], authors: ["64Will64"],
exclaimer:'NINTENDO 64?!?!??!?! 69Bot when??????', exclaimer: "NINTENDO 64?!?!??!?! 69Bot when??????",
foundation: 'NodeJS/Mineflayer', foundation: "NodeJS/Mineflayer",
prefixes: ['w='] prefixes: ["w="],
}, },
{ {
name: { text: 'Nebulabot', color: 'dark_purple', bold:false }, name: { text: "Nebulabot", color: "dark_purple", bold: false },
authors: ['IuCC'], authors: ["IuCC"],
exclaimer:'the void', exclaimer: "the void",
foundation: 'NodeJS/Node-minecraft-protocol', foundation: "NodeJS/Node-minecraft-protocol",
prefixes: ['['] prefixes: ["["],
}, },
{ {
name: { text: 'SharpBot', color: 'aqua', bold:false }, name: [
authors: ['64Will64'], { text: "Prism", color: "#00FF9C", bold: true },
exclaimer:'sharp as in the tv? idfk im out of jokes also the first c# bot on the list??', { text: "Bot", color: "white",bold:true },
foundation: 'C#/MineSharp', ],
prefixes: ['s='] authors: ["IuCC"],
exclaimer: "prismarine :3",
foundation: "NodeJS/Node-minecraft-protocol",
prefixes: ["["],
},
{
name: { text: "SharpBot", color: "aqua", bold: false },
authors: ["64Will64"],
exclaimer:
"sharp as in the tv? idfk im out of jokes also the first c# bot on the list??",
foundation: "C#/MineSharp",
prefixes: ["s="],
}, },
{ {
name: { text: 'MoonBot', color: 'red', bold:false }, name: { text: "MoonBot", color: "red", bold: false },
authors: ['64Will64'], authors: ["64Will64"],
exclaimer:'stop mooning/mooing me ', exclaimer: "stop mooning/mooing me ",
foundation: 'NodeJS/Mineflayer', foundation: "NodeJS/Mineflayer",
prefixes: ['m='] prefixes: ["m="],
}, },
{ {
name: { text: 'TableBot', color: 'yellow', bold:false }, name: { text: "TableBot", color: "yellow", bold: false },
authors: ['12alex12'], authors: ["12alex12"],
exclaimer:'TABLE CLOTH BOT?!?! ', exclaimer: "TABLE CLOTH BOT?!?! ",
foundation: 'NodeJS/Node-minecraft-protocol', foundation: "NodeJS/Node-minecraft-protocol",
prefixes: ['t!'] prefixes: ["t!"],
}, },
{ {
name: [{ text: 'Evil', color: 'dark_red', bold:false }, {text:'Bot', color:'dark_purple'}], name: [
authors: ['FusseligerDev'], { text: "Evil", color: "dark_red", bold: false },
exclaimer:'', { text: "Bot", color: "dark_purple" },
foundation: 'Java/Custom', ],
prefixes: ['!'] authors: ["FusseligerDev"],
exclaimer: "",
foundation: "Java/Custom",
prefixes: ["!"],
}, },
{ {
name: { text: 'SBot Java', color: 'white', bold:false }, // TODO: Gradient name: { text: "SBot Java", color: "white", bold: false }, // TODO: Gradient
authors: ['evkc'], authors: ["evkc"],
foundation: 'Java/MCProtocolLib', foundation: "Java/MCProtocolLib",
prefixes: [':'] prefixes: [":"],
},
{
name: { text: 'SBot Rust', color: 'white', bold:false}, // TODO: Gradient
authors: ['evkc'],
foundation: 'Rust',
prefixes: ['re:']
},
{
name: { text: 'Z-Boy-Bot', color: 'dark_purple', bold:false }, // TODO: Gradient
exclaimer: 'Most likely skidded along with kbot that the dev used',
authors: ['Romnci'],
foundation: 'NodeJS/mineflayer or Java/mcprotocollib idfk',
prefixes: ['Z]']
},
{
name: { text: 'ABot', color: 'gold', bold:true }, // TODO: Gradient
exclaimer: 'not used anymore (replaced by V2)',
authors: [{text: '_yfd', color: 'light_purple'}],
foundation: 'NodeJS/Node-Minecraft-Protocol',
prefixes: ['<']
}, },
{ {
name: { text: 'ABot-V2', color: 'gold', bold:true }, // TODO: Gradient name: { text: "SBot Rust", color: "white", bold: false }, // TODO: Gradient
exclaimer: '', authors: ["evkc"],
authors: [{text: '_yfd', color: 'light_purple'}], foundation: "Rust",
foundation: 'NodeJS/Node-Minecraft-Protocol', prefixes: ["re:"],
prefixes: ['<']
}, },
{ {
name: { text: 'FardBot', color: 'light_purple', bold:false }, name: { text: "Z-Boy-Bot", color: "dark_purple", bold: false }, // TODO: Gradient
authors: ['_yfd'], exclaimer: "Most likely skidded along with kbot that the dev used",
exclaimer: 'bot is dead lol', authors: ["Romnci"],
foundation: 'NodeJS/Mineflayer', foundation: "NodeJS/mineflayer or Java/mcprotocollib idfk",
prefixes: ['<'] prefixes: ["Z]"],
},
{
name: { text: "ABot", color: "gold", bold: true }, // TODO: Gradient
exclaimer: "not used anymore (replaced by V2)",
authors: [{ text: "_yfd", color: "light_purple" }],
foundation: "NodeJS/Node-Minecraft-Protocol",
prefixes: ["<"],
},
{
name: { text: "ABot-V2", color: "gold", bold: true }, // TODO: Gradient
exclaimer: "",
authors: [{ text: "_yfd", color: "light_purple" }],
foundation: "NodeJS/Node-Minecraft-Protocol",
prefixes: ["<"],
},
{
name: { text: "FardBot", color: "light_purple", bold: false },
authors: ["_yfd"],
exclaimer: "bot is dead lol",
foundation: "NodeJS/Mineflayer",
prefixes: ["<"],
}, },
{ {
name: { text: 'ChipmunkBot', color: 'green', bold:false }, name: { text: "ChipmunkBot Java", color: "green", bold: false },
authors: ['_ChipMC_'], authors: ["_ChipMC_"],
exclaimer: 'chips? also shoutout to chip and chayapak for helping in the rewrite', exclaimer:
"chips? also shoutout to chip and chayapak for helping in the rewrite",
foundation: 'Java/MCProtocolLib', foundation: "Java/MCProtocolLib",
prefixes: ["'", "/'"] prefixes: ["'", "/'"],
}, },
{ {
name: { text: 'ChipmunkBot Old', color: 'green', bold:false }, name: { text: "ChipmunkBot NodeJS", color: "green", bold: false },
authors: ['_ChipMC_'], authors: ["_ChipMC_"],
foundation: 'NodeJS/Node-Minecraft-Protocol', foundation: "NodeJS/Node-Minecraft-Protocol",
},
{
name: { text: "TestBot", color: "aqua", bold: false },
authors: ["Blackilykat"],
foundation: "Java/MCProtocolLib",
prefixes: ["-"],
},
{
name: { text: "UBot", color: "grey", bold: false },
authors: ["HexWoman"],
exclaimer: "UwU OwO",
foundation: "NodeJS/node-minecraft-protocol",
prefixes: ['"'],
}, },
{ {
name: { text: 'TestBot', color: 'aqua', bold:false }, name: { text: "ChomeNS Bot Java", color: "yellow", bold: false },
authors: ['Blackilykat'], authors: ["chayapak"],
foundation: 'Java/MCProtocolLib', exclaimer: "wow its my bot !! ! 4374621q43567%^&#%67868-- chayapak",
prefixes: ["-"] foundation: "Java/MCProtocolLib",
prefixes: ["*", "cbot ", "/cbot "],
}, },
{ {
name: { text: 'UBot', color: 'grey', bold:false }, name: { text: "ChomeNS Bot NodeJS", color: "yellow", bold: false },
authors: ['HexWoman'], authors: ["chayapak"],
exclaimer: 'UwU OwO',
foundation: 'NodeJS/node-minecraft-protocol', foundation: "NodeJS/Node-Minecraft-Protocol",
prefixes: ['"'] prefixes: ["*", "cbot", "/cbot"],
}, },
{ {
name: { text: 'ChomeNS Bot Java', color: 'yellow', bold:false}, name: { text: "RecycleBot", color: "dark_green", bold: false },
authors: ['chayapak'], foundation: ["MorganAnkan"],
exclaimer: 'wow its my bot !! ! 4374621q43567%^&#%67868-- chayapak', exclaimer: "nice bot",
foundation: 'Java/MCProtocolLib', language: "NodeJS/node-minecraft-protocol",
prefixes: ['*', 'cbot ', '/cbot '] prefixes: ["="],
},
{
name: { text: 'ChomeNS Bot NodeJS', color: 'yellow', bold:false},
authors: ['chayapak'],
foundation: 'NodeJS/Node-Minecraft-Protocol',
prefixes: ['*', 'cbot', '/cbot']
}, },
{ {
name: { text: 'RecycleBot', color: 'dark_green', bold:false}, name: { text: "neobot", color: "blue", bold: false },
foundation: ['MorganAnkan'], exclaimer: "n e o b o t ;oslkdfj;salkdfj;ladsjf",
exclaimer: 'nice bot', authors: ["mirkokral"],
language: 'NodeJS/node-minecraft-protocol', foundation: "java/MCProtocolLib",
prefixes: ['='] prefixes: ["_"],
}, },
{ {
name: { text: 'ManBot', color: 'dark_green' , bold:false }, name: { text: "ManBot", color: "dark_green", bold: false },
exclaimer: '(more like men bot :skull:) OH HAAAAAAAAAAAAAAIIILL LOGINTIMEDOUT', exclaimer:
authors: ['Man/LogintimedOut'], "(more like men bot :skull:) OH HAAAAAAAAAAAAAAIIILL LOGINTIMEDOUT",
foundation: 'NodeJS/mineflayer', authors: ["Man/LogintimedOut"],
prefixes: ['(Note:I dont remember!!)'] foundation: "NodeJS/mineflayer",
prefixes: ["(Note:I dont remember!!)"],
}, },
{ {
name: [{ text: 'Useless', color: 'red', bold:false}, { text: 'Bot', color: 'gray', bold:false}], name: [
exclaimer: 'it isnt useless its a good bot................', { text: "Useless", color: "red", bold: false },
authors: ['IuCC'], { text: "Bot", color: "gray", bold: false },
foundation: 'NodeJS/node-minecraft-protocol', ],
prefixes: ['['] exclaimer: "it isnt useless its a good bot................",
authors: ["IuCC"],
foundation: "NodeJS/node-minecraft-protocol",
prefixes: ["["],
}, },
{ {
name: [{ text: 'Blurry', color: 'dark_purple' , bold:false}, { text: 'Bot', color: 'red' }], name: [
exclaimer: '', { text: "Blurry", color: "dark_purple", bold: false },
authors: ['SirLennox'], { text: "Bot", color: "red" },
foundation: 'Java/custom', ],
prefixes: [','] exclaimer: "",
authors: ["SirLennox"],
foundation: "Java/custom",
prefixes: [","],
}, },
{ {
name: [{ text: 'SnifferBot', color: 'gold' , bold:false}], name: [{ text: "SnifferBot", color: "gold", bold: false }],
exclaimer: 'sniff sniff', exclaimer: "sniff sniff FNFBoyfriendBot simp",
authors: ['Seasnail8169'], authors: ["popbob"],
foundation: 'NodeJS/Node-minecraft-protocol', foundation: "NodeJS/Node-minecraft-protocol",
prefixes: ['>'] prefixes: [">"],
}, },
{ {
name: [{ text: 'KittyCorp', color: 'yellow', bold:false }, { text: 'Bot', color: 'yellow' }], name: [{ text: "XBot", color: "dark_purple", bold: false }],
exclaimer: '3 words ginlang is gay', exclaimer: "",
authors: ['ginlang , G6_, ArrayBuffer, and i guess more??'], authors: ["popbob"],
foundation: 'NodeJS/node-minecraft-protocol', foundation: "ts-Node/Node-minecraft-protocol",
prefixes: ['^'] prefixes: ["$"],
},
{
name: [
{ text: "Kitty", color: "gold", bold: false },{text:"Corp", color:'aqua',bold:false},
{ text: "Bot", color: "yellow",bold:false },
],
exclaimer: "3 words ginlang is gay",
authors: ["ginlang , G6_, ArrayBuffer, and i guess more??"],
foundation: "NodeJS/node-minecraft-protocol",
prefixes: ["^"],
}, },
{ {
name: [{ text:'FNF', color: 'dark_purple', bold: false}, {text:'Boyfriend', color: 'aqua', bold:false}, {text:'Bot', color:'dark_red', bold:false}, {text:' Node-Minecraft-Protocol', color:'black', bold:false}], name: [
authors: [{ text:'Parker2991', color: 'dark_red'}, {text:' _ChipMC_', color: 'dark_green', bold:false}, {text:' chayapak', color:'yellow', bold:false}, {text:' _yfd', color:'light_purple', bold:false}], { text: "FNF", color: "dark_purple", bold: false },
exclaimer: 'FNFBoyfriendBot NMP Rewrite', { text: "Boyfriend", color: "aqua", bold: false },
foundation: 'NodeJS/node-minecraft-protocol', { text: "Bot", color: "dark_red", bold: false },
prefixes: ['~'] { text: " nmp", color: "black", bold: false },
],
authors: [
{ text: "Parker2991", color: "dark_red" },
{ text: " _ChipMC_", color: "dark_green", bold: false },
{ text: " chayapak", color: "yellow", bold: false },
{ text: " _yfd", color: "light_purple", bold: false },
{ text: "popbob", color: "gold" },
],
exclaimer: "FNFBoyfriendBot NMP Rewrite",
foundation: "NodeJS/node-minecraft-protocol",
prefixes: ["~ % &"],
}, },
{ {
name: [{ text:'FNF', color: 'dark_purple', bold: false}, {text:'Boyfriend', color: 'aqua', bold:false}, {text:'Bot', color:'dark_red', bold:false}, {text:' Mineflayer', color:'green', bold:false}], name: [
authors: [{text:'Parker2991', color:'dark_red' }, {text:' _ChipMC_', color:'dark_green', bold:false }], { text: "FNF", color: "dark_purple", bold: false },
exclaimer:'1037 LINES OF CODE WTFARD!??! also this version is in console commands only' , { text: "Boyfriend", color: "aqua", bold: false },
foundation: 'NodeJS/mineflayer', { text: "Bot", color: "dark_red", bold: false },
prefixes: [] { text: " legacy", color: "green", bold: false },
} ],
] authors: [
{ text: "Parker2991", color: "dark_red" },
{ text: " _ChipMC_", color: "dark_green", bold: false },
],
exclaimer:
"1037 LINES OF CODE WTFARD!??! also this version is in console commands only",
foundation: "NodeJS/mineflayer",
prefixes: [],
},
];
module.exports = { module.exports = {
name: 'bots', name: "bots",
description:['shows a list of known bots'], description: ["shows a list of known bots"],
aliases:['knownbots'], aliases: ["knownbots"],
trustLevel: 0, trustLevel: 0,
execute (context) { execute(context) {
const query = context.arguments.join(' ').toLowerCase() const query = context.arguments.join(" ").toLowerCase();
const bot = context.bot const bot = context.bot;
if (query.length === 0) { if (query.length === 0) {
const list = [] const list = [];
for (const info of bots) { for (const info of bots) {
if (list.length !== 0) list.push({ text: ', ', color: 'gray' })// list.push(info.name) if (list.length !== 0) list.push({ text: ", ", color: "gray" }); // list.push(info.name)
list.push(info.name) list.push(info.name);
} }
context.source.sendFeedback(['Known bots (', bots.length, ') - ', ...list], false) context.source.sendFeedback(
return ["Known bots (", bots.length, ") - ", ...list],
false,
);
return;
} }
for (const info of bots) { for (const info of bots) {
const plainName = String(context.bot.getMessageAsPrismarine(info.name)).toLowerCase() const plainName = String(
if (plainName.includes(query)) this.sendBotInfo(info, context.bot) context.bot.getMessageAsPrismarine(info.name),
).toLowerCase();
if (plainName.includes(query)) this.sendBotInfo(info, context.bot);
} }
}, },
sendBotInfo (info, bot) { sendBotInfo(info, bot) {
const component = [''] const component = [""];
component.push('Name: ', info.name) component.push("Name: ", info.name);
if (info.exclaimer) component.push('\n', 'Exclaimer: ', info.exclaimer) if (info.exclaimer) component.push("\n", "Exclaimer: ", info.exclaimer);
if (info.authors && info.authors.length !== 0) { if (info.authors && info.authors.length !== 0) {
component.push('\n', 'Authors: ') component.push("\n", "Authors: ");
for (const author of info.authors) { for (const author of info.authors) {
component.push(author, { text: ', ', color: 'gray' }) component.push(author, { text: ", ", color: "gray" });
} }
component.pop() component.pop();
} }
if (info.foundation) component.push('\n', 'Foundation: ', info.foundation) if (info.foundation) component.push("\n", "Foundation: ", info.foundation);
if (info.prefixes && info.prefixes.length !== 0) { if (info.prefixes && info.prefixes.length !== 0) {
component.push('\n', 'Prefixes: ') component.push("\n", "Prefixes: ");
for (const prefix of info.prefixes) { for (const prefix of info.prefixes) {
component.push(prefix, { text: ', ', color: 'gray' }) component.push(prefix, { text: ", ", color: "gray" });
} }
component.pop() component.pop();
} }
bot.tellraw([component]) bot.tellraw([component]);
} },
}//it doing it just for the ones i added lol }; //it doing it just for the ones i added lol
// prob a replit moment, it probably thinks there are regexes in the strings // prob a replit moment, it probably thinks there are regexes in the strings

View file

@ -29,11 +29,18 @@ const bots = [
exclaimer:'fixed the issue with the cpu checking in the info command added discord hashing back into the bot to work along side the keys made it check to see if the config file is in the directory and if not it will recreate the config from default.js', exclaimer:'fixed the issue with the cpu checking in the info command added discord hashing back into the bot to work along side the keys made it check to see if the config file is in the directory and if not it will recreate the config from default.js',
}, },
{// {//
name: { text: 'v5.0.3', color: 'gray', bold:false }, name: { text: 'v5.0.3', color: 'green', bold:false },
authors: [''], authors: [''],
foundation: '12/29/23', foundation: '12/29/23',
exclaimer:'mabe the bot last update of 2023 cuz next year will be 2024 www but anyway expanded the disconnect messages for both console and discord but thats pretty much it', exclaimer:'mabe the bot last update of 2023 cuz next year will be 2024 www but anyway expanded the disconnect messages for both console and discord but thats pretty much it',
},
{//
name: { text: 'v5.0.4', color: 'green', bold:false },
authors: [''],
foundation: '1/12/24',
exclaimer:'first update of 2024 for the bot but anyway merged the test and errortest commands into cmdtest, changed the colors for the help command public is #00FFFF, trusted is dark_purple and owner remained as dark red. moved the module loader from bot.js to index.js to split the boot time in half which now allows module functions like bot.chat() to be used in bot.js and also since the command manager is a module it also loads the commands thats a w on all ends also removed some modules to improve the bots boot time and moved the functions for the sctoggle command into the command itself and not as a module which helped the boot time as well and last but not least merged the memused usage in the info command with the serverinfo usage and made the memusage command use the bossbar and not the actionbar',
}, },
]// ]//
//back //back

View file

@ -1,10 +1,10 @@
const CommandError = require('../CommandModules/command_error') const CommandError = require('../CommandModules/command_error')
const CommandSource = require('../CommandModules/command_source') const CommandSource = require('../CommandModules/command_source')
module.exports = { module.exports = {
name: 'test', name: 'cmdtest',
description:['very 1st command in the bot to test to see if things are working'], description:['usages are test and msg error'],
trustLevel: 0, trustLevel: 0,
aliases:['tst'], aliases:['cmdtst', 'commandtest', 'commandtst'],
execute (context) { execute (context) {
const bot = context.bot const bot = context.bot
@ -12,7 +12,10 @@ trustLevel: 0,
const player = context.source.player.profile.name const player = context.source.player.profile.name
const uuid = context.source.player.uuid const uuid = context.source.player.uuid
const message = context.arguments.join(' ') // WHY SECTION SIGNS!! const message = context.arguments.join(' ') // WHY SECTION SIGNS!!
const component = { const args = context.arguments
switch (args[0]) {
case 'msg':
const component = {
translate: '[%s] %s %s %s %s %s', translate: '[%s] %s %s %s %s %s',
with: [ with: [
{ {
@ -51,16 +54,25 @@ context.source.player.displayName ?? context.source.player.profile.name,
text:`, uuid: ${uuid}, ` text:`, uuid: ${uuid}, `
}, },
//entry.displayName //entry.displayName
{text:`Argument: ${message}`} {text:`Argument: ${args.slice(1).join(' ')}`}
]//command.split(' ')[0] ]//command.split(' ')[0]
} }
bot.tellraw(component) bot.tellraw([component])
// context.source.sendFeedback({text:`Hello, World!, Player: ${player}, uuid: ${uuid}, Argument: ${message}`})
} break
case 'error':
throw new Error(args.slice(1).join(' '))
break
default:
context.source.sendError([{ text: 'Invalid action', color: 'dark_red', bold:false }])
context.source.sendError([{ text: 'the usages are msg and error', color: 'gray', bold:false }])
}
}
} }
/* /*
*/ */
//context.source.player.displayName ?? context.source.player.profile.name, //context.source.player.displayName ?? context.source.player.profile.name,

View file

@ -13,7 +13,7 @@ const bot = context.bot
const prefix = { const prefix = {
translate: '[%s] %s \u203a %s', translate: '[%s] %s \u203a %s',
color:'gray', color:'dark_gray',
with: [ with: [
{ {
text: 'FNFBoyfriendBot Console', color:'#00FFFF' text: 'FNFBoyfriendBot Console', color:'#00FFFF'

View file

@ -10,7 +10,7 @@ module.exports = {
const args = context.arguments const args = context.arguments
const source = context.source const source = context.source
source.sendFeedback(`${bot.username} fell out of the world`) source.sendFeedback(`${bot.username} fell out of the world`)
process.exit('amongus') process.exit()
} }
} }
/*context.source.sendFeedback('farding right now....') /*context.source.sendFeedback('farding right now....')

View file

@ -1,14 +0,0 @@
const CommandError = require('../CommandModules/command_error')
module.exports = {
name: 'errortest',
description:['test errors'],
aliases:['error', 'errtest', 'errtst'],
trustLevel: 0,
execute (context) {
const message = context.arguments.join(' ')
//context.source.sendFeedback('hint hover your mouse over the error')
throw new Error(message)
}
}

View file

@ -1,15 +0,0 @@
const CommandError = require('../CommandModules/command_error')
module.exports = {
name: 'filter',
trustLevel: 1,
description:['filter players (not functional)'],
execute (context) {
//throw new CommandError('temp disabled')
const target = context.arguments.join(' ')
const bot = context.bot
}
}

View file

@ -23,9 +23,9 @@ module.exports = {
bold: false, bold: false,
color: 'white', color: 'white',
with: [ with: [
{ color: 'green', text: 'Public'}, { color: '#00FFFF', text: 'Public'},
{ color: 'white', text: ' | '}, { color: 'white', text: ' | '},
{ color: 'red', text: 'Trusted'}, { color: 'dark_purple', text: 'Trusted'},
{ color: 'white', text: ' | '}, { color: 'white', text: ' | '},
{ color: 'dark_red', text: 'Owner'}, { color: 'dark_red', text: 'Owner'},
] ]
@ -33,8 +33,8 @@ module.exports = {
if (args[0]) { if (args[0]) {
let valid let valid
for (const fard in bot.commandManager.amogus) { // i broke a key woops for (const commands in bot.commandManager.commandlist) { // i broke a key woops
const command = bot.commandManager.amogus[fard] const command = bot.commandManager.commandlist[commands]
if (args[0].toLowerCase() === command.name ) if (args[0].toLowerCase() === command.name )
// if (args[0].toLowerCase() === command.aliases) // if (args[0].toLowerCase() === command.aliases)
@ -58,7 +58,7 @@ module.exports = {
source.sendFeedback([cmd, {translate: `Unknown command %s. Type "${bot.options.commands.MainPrefix}help" for help or click on this for the command`,color:'red', with: [args[0]], clickEvent: bot.options.Core.customName ? { action: 'suggest_command', value: `${bot.options.commands.MainPrefix}help` } : undefined}]) source.sendFeedback([cmd, {translate: `Unknown command %s. Type "${bot.options.commands.MainPrefix}help" for help or click on this for the command`,color:'red', with: [args[0]], clickEvent: bot.options.Core.customName ? { action: 'suggest_command', value: `${bot.options.commands.MainPrefix}help` } : undefined}])
// bot.tellraw([cmd, {translate: `Unknown command %s. Type "${bot.options.commands.prefix}help" for help or click on this for the command`, with: [args[0]], clickEvent: bot.options.Core.customName ? { action: 'suggest_command', value: `${bot.options.commands.prefix}help`, color:'red' } : undefined}]) // bot.tellraw([cmd, {translate: `Unknown command %s. Type "${bot.options.commands.prefix}help" for help or click on this for the command`, with: [args[0]], clickEvent: bot.options.Core.customName ? { action: 'suggest_command', value: `${bot.options.commands.prefix}help`, color:'red' } : undefined}])
}//i will add the descriptions reading as tests and action add the descriptions for the commands after }//i will add the descriptions reading as tests and action add the descriptions for the commands after
const length = context.bot.commandManager.amogus.length // ok const length = context.bot.commandManager.commandlist.length // ok
//i guess i did delete smh woops //i guess i did delete smh woops
//context.source.sendFeedback([cmd, 'Commands (', length, ') ', category, ...commandList], false) //context.source.sendFeedback([cmd, 'Commands (', length, ') ', category, ...commandList], false)
@ -67,8 +67,8 @@ module.exports = {
let t_rust = [] let t_rust = []
let own_her = [] let own_her = []
let cons_ole = [] let cons_ole = []
for (const fard in bot.commandManager.amogus) { for (const commands in bot.commandManager.commandlist) {
const command = bot.commandManager.amogus[fard] const command = bot.commandManager.commandlist[commands]
// if (command.consoleOnly == true) return console.log(command); // if (command.consoleOnly == true) return console.log(command);
if(command.trustLevel === 3) { if(command.trustLevel === 3) {
@ -129,7 +129,7 @@ module.exports = {
// ${command.name}\nhashOnly:§c${command.hashOnly}§r\nconsoleOnly:§c${command.consoleOnly && !context.console}§r\n${command.description} // ${command.name}\nhashOnly:§c${command.hashOnly}§r\nconsoleOnly:§c${command.consoleOnly && !context.console}§r\n${command.description}
///tellraw @a {"translate":"","hoverEvent":{"action":"show_text","value":[{"text":""},{"text":""}]},"clickEvent":{"action":"run_command","value":"a"}} ///tellraw @a {"translate":"","hoverEvent":{"action":"show_text","value":[{"text":""},{"text":""}]},"clickEvent":{"action":"run_command","value":"a"}}
clickEvent: command.name ? { action: 'suggest_command', value: `~${command.name}` } : undefined,
} }
)//my w )//my w
} }
@ -138,7 +138,7 @@ module.exports = {
t_rust.push( t_rust.push(
{ {
text: command.name + ' ', text: command.name + ' ',
color: 'red', color: 'dark_purple',
translate:"", translate:"",
@ -169,7 +169,7 @@ module.exports = {
pub_lick.push( pub_lick.push(
{ {
text: command.name + ' ', text: command.name + ' ',
color: 'green', color: '#00FFFF',
translate:"", translate:"",
hoverEvent:{ hoverEvent:{
action:"show_text", // Welcome to Kaboom!\n > Free OP - Anarchy - Creative (frfr) action:"show_text", // Welcome to Kaboom!\n > Free OP - Anarchy - Creative (frfr)
@ -207,15 +207,14 @@ module.exports = {
if(isConsole) { if(isConsole) {
// mabe idk // mabe idk
const length = context.bot.commandManager.amogus.length const length = context.bot.commandManager.commandlist.length
context.source.sendFeedback([cmd, 'Commands (', length, ') ', category, ...pub_lick, t_rust, own_her, cons_ole], false) context.source.sendFeedback([cmd, 'Commands (', length, ') ', category, ...pub_lick, t_rust, own_her, cons_ole], false)
} else { } else {
const length = context.bot.commandManager.amogus.filter(c => c.trustLevel != 3).length const length = context.bot.commandManager.commandlist.filter(c => c.trustLevel != 3).length
//trustlevel //trustlevel
context.source.sendFeedback([cmd, 'Commands (', length, ') ', category, ...pub_lick, t_rust ,own_her], false) context.source.sendFeedback([cmd, 'Commands (', length, ') ', category, ...pub_lick, t_rust ,own_her], false)
// bot.tellraw([own_her]) // bot.tellraw([own_her])
//console.log(t_rust) //console.log(t_rust)
}// }//

View file

@ -1,211 +1,263 @@
const CommandError = require('../CommandModules/command_error') const CommandError = require("../CommandModules/command_error");
const path = require("path");
const fs = require("fs/promises");
const packageJSON = require("../package.json");
const path = require('path')
const fs = require('fs/promises')
const packageJSON = require("../package.json")
async function getCpuModelName () {
const cpuInfo = await fs.readFile('/proc/cpuinfo')
const lines = cpuInfo.toString().split('\n')
// among us way of doing it
const modelName = lines.find((line) => line.startsWith('model name')).split('\t: ')
return modelName[1]
}
module.exports = { module.exports = {
name: 'info', name: "info",
description:['check the bots info. the args are version, discord, serverinfo, logininfo, uptime, memused, creators'], description: [
aliases:['information'], "check the bots info. the usages are version, discord, serverinfo, logininfo, uptime, creators",
trustLevel: 0, ],
async execute (context, client) { aliases: ["information"],
const bot = context.bot trustLevel: 0,
const args = context.arguments async execute(context) {
// const client = context.client const bot = context.bot;
const cmd = {//test.js const args = context.arguments;
translate: '[%s] ', // const client = context.client
const cmd = {
//test.js
translate: "[%s] ",
bold: false, bold: false,
color: 'white', color: "white",
with: [ with: [{ color: "gold", text: "Info Cmd" }],
{ color: 'gold', text: 'Info Cmd'}, };
]
}
const buildstring = process.env["buildstring"];
/*context.source.sendFeedback(`${buildstring}`, false) const foundationbuildstring = process.env["FoundationBuildString"];
context.source.sendFeedback(`${foundationbuildstring}`) const source = context.source;
context.source.sendFeedback('BotEngine:Node-Minecraft-Protocol', false)
*/
const buildstring = process.env['buildstring']
const foundationbuildstring = process.env['FoundationBuildString']
const source = context.source
switch (args[0]) { switch (args[0]) {
case 'version': case "version":
const discordJSVersion = packageJSON.dependencies["discord.js"]; const discordJSVersion = packageJSON.dependencies["discord.js"];
const MinecraftProtocolVersion = packageJSON.dependencies["minecraft-protocol"]; const MinecraftProtocolVersion =
const npmVersion = packageJSON.dependencies["npm"]; packageJSON.dependencies["minecraft-protocol"];
context.source.sendFeedback ({ color: "gray", text: `${bot.buildstring}`})
context.source.sendFeedback ({ color: "gray", text: `${bot.fbs}`})
//BotEngine:Node-Minecraft-Protocol @${MinecraftProtocolVersion}
context.source.sendFeedback ({
text:`BotEngine:Node-Minecraft-Protocol @${MinecraftProtocolVersion}`,
color:'gray',
translate:"",
hoverEvent:{
action:"show_text",
value:[
{
text:'Node-Minecraft-protocol',
color:'gray',
}
]
},clickEvent:{
action:"open_url",value:`https://github.com/PrismarineJS/node-minecraft-protocol`
}
})
/* text:bot.options.discord.invite,
color:'gray',
translate:"",
hoverEvent:{
action:"show_text",
value:[
{
text:'click here to join!',
color:'gray',
}
]
},clickEvent:{
action:"open_url",value:`${bot.options.discord.invite}`
}
})
*/
//Discord.js @${discordJSVersion}
context.source.sendFeedback ({ text:`Discord.js @${discordJSVersion}`,
color:'gray',
translate:"",
hoverEvent:{
action:"show_text",
value:[
{
text:'Discord.js',
color:'gray',
}
]
},clickEvent:{
action:"open_url",value:`https://github.com/discordjs/discord.js`
}
})
context.source.sendFeedback ({ color: "gray", text: `Node js Version @${process.version}`},)
context.source.sendFeedback({color: 'gray', text:`npm Version:@${npmVersion}`})
break
case 'discord':
source.sendFeedback({
text:bot.options.discord.invite,
color:'gray',
translate:"",
hoverEvent:{
action:"show_text",
value:[
{
text:'click here to join!',
color:'gray',
}
]
},clickEvent:{
action:"open_url",value:`${bot.options.discord.invite}`
}
})
break
case 'serverinfo':
const os = require('os')
context.source.sendFeedback({ context.source.sendFeedback({
color:'gray',text:`Hostname: ${os.hostname()}`}) color: "gray",
context.source.sendFeedback({ text: `${process.env["buildstring"]}`,
color: "gray", text: `Working Directory: ${path.join(__dirname, '..')}`}) });
context.source.sendFeedback( { color: "gray", text: `OS architecture: ${os.arch()}`})
context.source.sendFeedback({ color: "gray", text: `OS platform: ${os.platform()}`}) context.source.sendFeedback({
context.source.sendFeedback({ color: "gray", text: `OS name: ${os.version()}`}) color: "gray",
context.source.sendFeedback({ color: "gray", text: `CPU cores: ${os.cpus().length}`}) text: `${process.env["FoundationBuildString"]}`,
/*const os = require('os') const cpus = os.cpus() for (const cpu of cpus){bot.tellraw(cpu.model)}*/ });
//os.cpus()[0].model
/* const date = new Date().toLocaleDateString("en-US", {
timeZone: "America/CHICAGO",
});
context.source.sendFeedback({
text: `Bot Release: 11/22/2022 `,
color: "gray",
});
context.source.sendFeedback({
text: `BotEngine:Node-Minecraft-Protocol @${MinecraftProtocolVersion}`,
color: "gray",
translate: "",
hoverEvent: {
action: "show_text",
value: [
{
text: "Node-Minecraft-protocol",
color: "gray",
},
],
},
clickEvent: {
action: "open_url",
value: `https://github.com/PrismarineJS/node-minecraft-protocol`,
},
});
context.source.sendFeedback({
text: `Discord.js @${discordJSVersion}`,
color: "gray",
translate: "",
hoverEvent: {
action: "show_text",
value: [
{
text: "Discord.js",
color: "gray",
},
],
},
clickEvent: {
action: "open_url",
value: `https://github.com/discordjs/discord.js`,
},
});
context.source.sendFeedback({
color: "gray",
text: `Node js Version @${process.version}`,
});
// context.source.sendFeedback({color: 'gray', text:`npm Version:@${npmVersion}`})
break;
case "thankyou":
var prefix =
"&8&l&m[&4&mParker2991&8]&8&m[&b&mBOYFRIEND&8]&8&m[&b&mCONSOLE&8]&r ";
bot.core.run(
"bcraw " +
prefix +
"Thank you for all that helped and contributed with the bot, it has been one hell of a ride with the bot hasnt it? From November 22, 2022 to now, 0.1 beta to 4.0 alpha, Mineflayer to Node-Minecraft-Protocol. I have enjoyed all the new people i have met throughout the development of the bot back to the days when the bot used mineflayer for most of its lifespan to the present as it now uses node-minecraft-protocol. Its about time for me to tell how development went in the bot well here it is, back in 0.1 beta of the bot it was skidded off of menbot 1.0 reason why? Well because LoginTimedout gave me the bot when ayunboom was still a thing and he helped throughout that time period bot and when 1.0 beta came around he he just stopped helping me on it why? because he had servers to run so yeah but anyway back then i didnt know what skidded like i do now so i thought i could get away with but i was wrong 💀. Early names considered for the bot were &6&lParkerBot &4&lDEMONBot &b&lWoomyBot &b&lBoyfriendBot,&r i kept the name &b&lBoyfriendBot&r throughout most of the early development but i got sick and tired of being harassed about the name being told it was gay but people really didnt know what it meant did they? It was referenced to Boyfriend from Friday Night Funkin so right around 1.0 released i renamed it to &b&lFNFBoyfriend&4&lBot &rand around 2.0 changed it to &5&lFNF&b&lBoyfriend&4&lBot &rand luckily avoided the harassment when i changed it i love coding and i want to learn how to code more thank you all!",
);
break;
case "discord":
source.sendFeedback({
text: bot.options.discord.invite,
color: "gray",
translate: "",
hoverEvent: {
action: "show_text",
value: [
{
text: "click here to join!",
color: "gray",
},
],
},
clickEvent: {
action: "open_url",
value: `${bot.options.discord.invite}`,
},
});
break;
case "serverinfo":
const os = require("os");
context.source.sendFeedback({
color: "gray",
text: `Hostname: ${os.hostname()}`,
});
context.source.sendFeedback({
color: "gray",
text: `Working Directory: ${path.join(__dirname, "..")}`,
});
context.source.sendFeedback({
color: "gray",
text: `OS architecture: ${os.arch()}`,
});
context.source.sendFeedback({
color: "gray",
text: `OS platform: ${os.platform()}`,
});
context.source.sendFeedback({
color: "gray",
text: `OS name: ${os.version()}`,
});
context.source.sendFeedback({
color: "gray",
text: `CPU cores: ${os.cpus().length}`,
});
/*
if (os.platform() !== 'linux'){ if (os.platform() !== 'linux'){
source.sendFeedback({text:'cannot find the cpu model are you sure the bot is running on linux?', color:'red'}) source.sendFeedback({text:'cannot find the cpu model are you sure the bot is running on linux?', color:'red'})
} }
else if (os.platform() === 'linux') { else if (os.platform() === 'linux') {
*/ source.sendFeedback({ color: "gray", text: `CPU model: ${await os.cpus()[0].model}`}) */ source.sendFeedback({
// } color: "gray",
/*translate: '\n %s \n %s \n %s \n %s \n %s \n %s \n %s',//lazy fix text: `CPU model: ${os.cpus()[0].model}`,
with: [ });
{ color: "gray", text: `Hostname: ${os.hostname()}`}, source.sendFeedback({
{ color: "gray", text: `Working Directory: ${path.join(__dirname, '..')}`}, translate:'%s%s%s',
{ color: "gray", text: `OS architecture: ${os.arch()}`}, color: "gray",
{ color: "gray", text: `OS platform: ${os.platform()}`}, with: [{text:`Server Memory Usage `, color:'gray'},{text:`${Math.floor(
{ color: "gray", text: `OS name: ${os.version()}`}, os.freemem() / 1048576,
{ color: "gray", text: `CPU cores: ${os.cpus().length}`}, )} `,color:'gray'},{text: `MiB / ${Math.floor(os.totalmem() / 1048576)} MiB`, color:'gray'}],
{ color: "gray", text: `CPU model: ${await getCpuModelName()}`}, });
break;
case "logininfo":
source.sendFeedback({
text: `Bot Username: "${bot.username}"`,
color: "gray",
});
source.sendFeedback({ text: `Bot uuid:"${bot.uuid}"`, color: "gray" });
source.sendFeedback({
text: `Minecraft Java Version: "${bot.version}"`,
color: "gray",
});
source.sendFeedback({
text: `Server: "${bot.options.host}:${bot.options.port}"`,
color: "gray",
});
] source.sendFeedback({
});*/ text: `Main Prefix: "${bot.options.commands.MainPrefix}"`,
break color: "gray",
case 'logininfo': });
source.sendFeedback({text:`Bot Username: "${bot.username}"`, color:'gray'}) source.sendFeedback({
source.sendFeedback({text:`Bot uuid:"${bot.uuid}"`, color:'gray'}) text: `Secondary Prefix: "${bot.options.commands.SecondaryPrefix}"`,
color: "gray",
});
source.sendFeedback({
text: `Tertiary Prefix: "${bot.options.commands.TertiaryPrefix}"`,
color: "gray",
});
source.sendFeedback({
text: `Discord Prefix: "${bot.options.discord.commandPrefix}"`,
color: "gray",
});
source.sendFeedback({
text: `Discord Username: "${bot.discord.client.user.username}#${bot.discord.client.user.discriminator}"`,
color: "gray",
});
source.sendFeedback({
text: `Discord Channel: ${bot.discord.channel.name}`,
});
source.sendFeedback({
color: "gray",
text: `ConsoleServer:"${bot.console.consoleServer}"`,
});
source.sendFeedback({text:`Minecraft Java Version: "${bot.version}"`, color:'gray'}) const amonger = bot.bots.map((eachBot) => eachBot.options.host + "\n");
const port = bot.bots.map((eachBot) => eachBot.options.port);
if (amonger.length === 0) {
source.sendFeedback({text:`Server: "${bot.host}:${bot.port}"`, color:'gray'}) const list = [];
for (const host of bots) {
if (list.length !== 0) {
list.push(host.name);
source.sendFeedback({text:`Main Prefix: "${bot.options.commands.MainPrefix}"`, color:"gray"}) }
source.sendFeedback({text:`Secondary Prefix: "${bot.options.commands.SecondaryPrefix}"`, color:"gray"}) }
source.sendFeedback({text:`Tertiary Prefix: "${bot.options.commands.TertiaryPrefix}"`, color:"gray"})
source.sendFeedback({text:`Discord Prefix: "${bot.options.discord.commandPrefix}"`, color:'gray'})
source.sendFeedback({text:`Discord Username: "${bot.discord.client.user.username}#${bot.discord.client.user.discriminator}"`, color:'gray'})
source.sendFeedback({text:`Discord Channel: ${bot.discord.channel.name}`})
source.sendFeedback({ color: "gray", text: `ConsoleServer:"${bot.console.consoleServer}"`})
const amonger = bot.bots.map(eachBot => eachBot.options.host + '\n')
const port = bot.bots.map(eachBot => eachBot.options.port)
if (amonger.length === 0){
const list = [];
for (const host of bots){
if (list.length !== 0) {
list.push(host.name)
}
} }
source.sendFeedback({ text: `Servers in Config ${amonger.length}` });
/* if (query.length === 0) {
const list = []
} for (const host of bots) {
source.sendFeedback('Servers in Config: ' + amonger.length)//real if (list.length !== 0) list.push({ text: ', ', color: 'gray' })// list.push(info.name)
/* list.push(info.name)
}
context.source.sendFeedback([], false)
return
}*/
/*
if (query.length === 0) {
const list = []
for (const info of bots) {
if (list.length !== 0) list.push({ text: ', ', color: 'gray' })// list.push(info.name)
list.push(info.name)
}
context.source.sendFeedback(['Known bots (', bots.length, ') - ', ...list], false)
return
}
*/
//real
/*
const util = fs.readdir('./util') const util = fs.readdir('./util')
source.sendFeedback({text:`Util Files loaded: ${util.length}`, color:'gray'}) source.sendFeedback({text:`Util Files loaded: ${util.length}`, color:'gray'})
@ -224,7 +276,7 @@ if (amonger.length === 0){
}); });
*/ */
/*context.source.sendFeedback({ /*context.source.sendFeedback({
translate: '\n %s \n %s \n %s \n %s \n %s \n %s \n %s \n %s', translate: '\n %s \n %s \n %s \n %s \n %s \n %s \n %s \n %s',
with: [ with: [
{ color: "gray", text: `Bot Username: "${bot.username}"`}, { color: "gray", text: `Bot Username: "${bot.username}"`},
@ -239,152 +291,165 @@ if (amonger.length === 0){
}); });
*/ */
// clickevent: { action:"open_url", value: `${context.bot.discord.invite}`}, // clickevent: { action:"open_url", value: `${context.bot.discord.invite}`},
break break;
case 'test': case "test":
// bot.tellraw('test') // bot.tellraw('test')
// const porta = bot.bots.map(eachBot => eachBot.options.port) // const porta = bot.bots.map(eachBot => eachBot.options.port)
const amongerus = bot.bots.map(eachBot => eachBot.options.host + ':' + eachBot.options.port + '\n') const amongerus = bot.bots.map(
(eachBot) => eachBot.options.host + ":" + eachBot.options.port + "\n",
);
/*
if (amonger.length === 0){
const list = [];
for (const host of bots){
if (list.length !== 0) {
list.push({text:`Server Count: ${host.name}`})
}
}
} */
//source.sendFeedback()
source.sendFeedback(amongerus);
// source.sendFeedback(amonger)
break;
case "uptime":
function format(seconds) {
function pad(s) {
return (s < 10 ? "0" : "") + s;
}
var hours = Math.floor(seconds / (60 * 60));
var minutes = Math.floor((seconds % (60 * 60)) / 60);
var seconds = Math.floor(seconds % 60);
return (
pad(`hours: ${hours}`) +
" " +
pad(`Mins: ${minutes}`) +
" " +
pad(`Seconds: ${seconds}`)
);
}
source.sendFeedback(amongerus) var uptime = process.uptime();
// source.sendFeedback(amonger)
break
case 'uptime':
function format(seconds){
function pad(s){
return (s < 10 ? '0' : '') + s;
}
var hours = Math.floor(seconds / (60*60));
var minutes = Math.floor(seconds % (60*60) / 60);
var seconds = Math.floor(seconds % 60);
return pad(`hours: ${hours}`) + ' ' + pad(`Mins: ${minutes}`) + ' ' + pad(`Seconds: ${seconds}`); source.sendFeedback({
} color: "gray",
text: `Bot Uptime: ${format(uptime)}`,
});
var uptime = process.uptime(); break;
case "creators":
source.sendFeedback({
color: "gray",
text: "Thank you to all that helped!",
});
source.sendFeedback({
translate: "%s%s",
with: [
{ color: "dark_red", text: "Parker" },
{ color: "black", text: "2991" },
],
source.sendFeedback ({ color: "gray", text: `Bot Uptime: ${format(uptime)}`}) hoverEvent: {
action: "show_text",
value: [
{
text: "FNF",
color: "dark_purple",
bold: true,
},
{
text: "Boyfriend",
color: "aqua",
bold: true,
},
{
text: "Bot ",
color: "dark_red",
bold: true,
},
{
text: "Discord",
color: "blue",
bold: false,
},
],
},
clickEvent: {
action: "open_url",
value: `${bot.options.discord.invite}`,
},
});
source.sendFeedback({
text: "_ChipMC_",
color: "dark_green",
translate: "",
hoverEvent: {
action: "show_text",
value: [
{
text: "chipmunk dot land",
color: "green",
},
],
},
clickEvent: {
action: "open_url",
value: `https://chipmunk.land`,
},
});
source.sendFeedback({
text: "chayapak",
color: "yellow",
translate: "",
hoverEvent: {
action: "show_text",
value: [
{
text: "Chomens ",
color: "yellow",
},
{
text: "Discord",
color: "blue",
},
],
},
clickEvent: {
action: "open_url",
value: `https://discord.gg/xdgCkUyaA4`,
},
});
source.sendFeedback({
text: "_yfd",
color: "light_purple",
translate: "",
hoverEvent: {
action: "show_text",
value: [
{
text: "ABot ",
color: "gold",
bold: true,
},
{
text: "Discord",
color: "blue",
bold: false,
},
],
},
clickEvent: {
action: "open_url",
value: `https://discord.gg/CRfP2ZbG8T`,
},
});
source.sendFeedback({ text: "Poopcorn(Poopbob???)", color: "gold" });
/*
break
case 'memused':
const os2 = require('os')
source.sendFeedback({ color: "gray", text: `§aMem §aused §a${Math.floor(os2.freemem() / 1048576)} §aMiB §a/ §a${Math.floor(os2.totalmem() / 1048576)} MiB`},)
/*
context.source.sendFeedback({
translate: '\n %s',
with: [
{ color: "gray", text: `§aMem §aused §a${Math.floor(os2.freemem() / 1048576)} §aMiB §a/ §a${Math.floor(os2.totalmem() / 1048576)} MiB`},
]
});
*/
break
case 'creators':
source.sendFeedback({ color: 'gray', text: 'Thank you to all that helped!' })
source.sendFeedback({
translate:'%s%s',
with:[
{ color: 'dark_red', text: 'Parker' },
{ color: 'black', text: '2991' },
],
hoverEvent:{
action:"show_text",
value:[
{
text:'FNF',
color:'dark_purple',
bold:true,
},{
text:'Boyfriend',
color:'aqua',
bold:true,
},{
text:'Bot ',
color:'dark_red',
bold:true,
},{
text:'Discord',
color:'blue',
bold:false,
}
]
},clickEvent:{
action:"open_url",value:`${bot.options.discord.invite}`
}
})
source.sendFeedback( {
text:'_ChipMC_',
color:'dark_green',
translate:"",
hoverEvent:{
action:"show_text",
value:[
{
text:'chipmunk dot land',
color:'green',
}
]
},clickEvent:{
action:"open_url",value:`https://chipmunk.land`
}
})
source.sendFeedback( {
text:'chayapak',
color:'yellow',
translate:"",
hoverEvent:{
action:"show_text",
value:[
{
text:'Chomens ',
color:'yellow',
},{
text:'Discord',
color:'blue',
}
]
},clickEvent:{
action:"open_url",value:`https://discord.gg/xdgCkUyaA4`
}
})
source.sendFeedback( {
text:'_yfd',
color:'light_purple',
translate:"",
hoverEvent:{
action:"show_text",
value:[
{
text:'ABot ',
color:'gold',
bold:true,
},{
text:'Discord',
color:'blue',
bold:false,
}
]
},clickEvent:{
action:"open_url",value:`https://discord.gg/CRfP2ZbG8T`
}
})
source.sendFeedback({text:"Poopcorn(Poopbob???)", color:'gold'})
/*
text:bot.options.discord.invite, text:bot.options.discord.invite,
color:'gray', color:'gray',
translate:"", translate:"",
@ -402,7 +467,7 @@ if (amonger.length === 0){
} }
}) })
*/ */
/* /*
context.source.sendFeedback({ context.source.sendFeedback({
translate: '\n %s \n %s%s \n %s \n %s \n %s \n %s \n %s \n %s \n %s \n %s \n %s', translate: '\n %s \n %s%s \n %s \n %s \n %s \n %s \n %s \n %s \n %s \n %s \n %s',
with: [ with: [
@ -424,11 +489,20 @@ if (amonger.length === 0){
] ]
}); });
*/ */
break break;
default: default:
context.source.sendError([cmd, { text: 'Invalid action', color: 'dark_red', bold:false }]) context.source.sendError([
context.source.sendError([cmd, { text: 'the args for the info command is version, discord, serverinfo, logininfo, uptime, memused, creators', color: 'gray', bold:false }]) cmd,
{ text: "Invalid action", color: "dark_red", bold: false },
]);
context.source.sendError([
cmd,
{
text: "the usages are version, discord, serverinfo, logininfo, uptime, creators",
color: "gray",
bold: false,
},
]);
} }
} },
} };

View file

@ -1,14 +0,0 @@
//command.unknown.argument command.unknown.command //command.context.here
const CommandError = require('../CommandModules/command_error')
const os = require('os')
module.exports = {
name: 'lol',
description:['idfk dont ask'],
aliases:['ohio'],
trustLevel: 0,
execute (context) {
throw new CommandError('idfk lmao')
}
}

View file

@ -10,15 +10,16 @@ module.exports = {
const bot = context.bot const bot = context.bot
const source = context.source const source = context.source
const args = context.arguments const args = context.arguments
switch (args[0]) { if (!args && !args[0] && !args[1] && !args[2] && !args[3] && !args[4] ) return
switch (args[0]) {
case 'on': case 'on':
bot.memusage.on() bot.memusage.on()
//source.sendFeedback({text: 'TPSBar is now enabled', color:'green'}) source.sendFeedback({text: 'Memusage is now enabled', color:'green'})
break break
case 'off': case 'off':
bot.memusage.off() bot.memusage.off()
// source.sendFeedback({text:'TPSBar is now disabled', color:'red'}) / source.sendFeedback({text:'Memusage is now disabled', color:'red'})
break break
default: default:

View file

@ -1,25 +0,0 @@
const CommandError = require('../CommandModules/command_error')
module.exports = {
name: 'music',
//<< this one line of code broke it lmao
description:[''],
aliases:[],
trustLevel: 0,
execute (context) {
const message = context.arguments.join(' ')
const bot = context.bot
throw new CommandError('working on it some other time')
}
}
//[%s] %s %s
//was it showing like that before?
// just do text bc too sus rn ig
// You should remove the with thing and the translate and replace
// Parker, why is hashing just random characters???
//wdym

View file

@ -37,7 +37,7 @@ module.exports = {
{ {
text: 'Boyfriend', text: 'Boyfriend',
bold: true, bold: true,
color: 'aqua' color: '#00FFFF'
}, },
{ {
text: 'Bot', text: 'Bot',

View file

@ -1,42 +1,50 @@
const CommandError = require('../CommandModules/command_error') const CommandError = require("../CommandModules/command_error");
const buildstring = process.env['buildstring'] const buildstring = process.env["buildstring"];
const foundation = process.env['FoundationBuildString'] const foundation = process.env["FoundationBuildString"];
module.exports = { module.exports = {
name: 'say', name: "say",
//<< this one line of code broke it lmao //<< this one line of code broke it lmao
description:['make me say something in custom chat'], description: ["make me say something in custom chat"],
trustLevel: 0, trustLevel: 0,
aliases:['tellrawsay', 'tellrawmsg', 'trmessage', 'tellrawmessage', 'sourcesendfeedbacksay','sourcesendfeedbackmsg','sourcesendfeedbackmessage', 'ssfbmsg', 'ssfmessage'], aliases: [
execute (context) { "tellrawsay",
"tellrawmsg",
const message = context.arguments.join(' ') "trmessage",
const bot = context.bot "tellrawmessage",
"sourcesendfeedbacksay",
"sourcesendfeedbackmsg",
"sourcesendfeedbackmessage",
"ssfbmsg",
"ssfmessage",
],
execute(context) {
const message = context.arguments.join(" ");
const bot = context.bot;
const prefix = { const prefix = {
translate: '[%s%s%s] \u203a %s', translate: "[%s%s%s] \u203a %s",
bold: false, bold: false,
color: 'white', color: "white",
with: [ with: [
{
color: 'dark_purple',
text: 'FNF', bold:true
},
{ {
color: 'aqua', color: "dark_purple",
text: 'Boyfriend', bold:true text: "FNF",
bold: true,
}, },
{ color: 'dark_red', {
text: 'Bot', bold:true color: "#00FFFF",
text: "Boyfriend",
bold: true,
}, },
{ color: "dark_red", text: "Bot", bold: true },
{ color: 'green', text: `${message}` } { color: "green", text: `${message}` },
] ],
} };
bot.tellraw([prefix]);
bot.tellraw([prefix]) },
} };
}
//[%s] %s %s //[%s] %s %s
//was it showing like that before? //was it showing like that before?
// just do text bc too sus rn ig // just do text bc too sus rn ig

View file

@ -13,77 +13,80 @@ module.exports = {
if (!args && !args[0] && !args[1] && !args[2]) return if (!args && !args[0] && !args[1] && !args[2]) return
switch (args[1]) { switch (args[1]) {
case 'vanishon': case 'vanishon':
bot.visibility.on() bot.options.selfcare.vanished = true
source.sendFeedback({text:'Vanish selfcare on', color:'green'}) source.sendFeedback({text:'Vanish selfcare on', color:'green'})
break break
case'vanishoff': case'vanishoff':
source.sendFeedback({text:'Vanish selfcare off', color:'red'}) source.sendFeedback({text:'Vanish selfcare off', color:'red'})
bot.visibility.off() bot.options.selfcare.vanished = false
bot.command('vanish off')
break break
case 'muteon': case 'muteon':
source.sendFeedback({text:'Mute selfcare on', color:'green'}) source.sendFeedback({text:'Mute selfcare on', color:'green'})
bot.unmuted.on() bot.options.selfcare.unmuted = true
break break
case 'muteoff': case 'muteoff':
source.sendFeedback({text:'Mute selfcare off', color:'red'}) source.sendFeedback({text:'Mute selfcare off', color:'red'})
bot.unmuted.off() bot.options.selfcare.unmuted = false
break break
case 'tptoggleon': case 'tptoggleon':
bot.tptoggle.on() bot.options.selfcare.tptoggle = false
source.sendFeedback({text:'Tptoggle on', color:'green'}) bot.command('tptoggle on')
source.sendFeedback({text:'Tptoggle on', color:'red'})
break break
case 'tptoggleoff': case 'tptoggleoff':
bot.tptoggle.off() bot.options.selfcare.tptoggle = true
source.sendFeedback({text:'Tptoggle off', color: 'red'})
source.sendFeedback({text:'Tptoggle off', color: 'green'})
break break
case 'godon': case 'godon':
bot.god.on() bot.options.selfcare.god = true
source.sendFeedback({text:'God selfcare on', color: 'green'}) source.sendFeedback({text:'God selfcare on', color: 'green'})
break break
case 'godoff': case 'godoff':
bot.god.off() bot.options.selfcare.god= false
source.sendFeedback({text:'Tptoggle off', color: 'red'}) source.sendFeedback({text:'Tptoggle off', color: 'red'})
break break
case 'prefixon': case 'prefixon':
bot.prefix.on() bot.options.selfcare.prefix = true
source.sendFeedback({text: 'Prefix selfcare on', color: 'green'}) source.sendFeedback({text: 'Prefix selfcare on', color: 'green'})
break break
case 'prefixoff': case 'prefixoff':
bot.prefix.off() bot.options.selfcare.prefix = false
source.sendFeedback({text:'Prefix selfcare off', color:'red'}) source.sendFeedback({text:'Prefix selfcare off', color:'red'})
break break
case 'usernameoff': case 'usernameoff':
bot.Username.off() bot.options.selfcare.username = false
source.sendFeedback({text:'Username selfcare off', color: 'red'}) source.sendFeedback({text:'Username selfcare off', color: 'red'})
break break
case 'usernameon': case 'usernameon':
bot.Username.on() bot.options.selfcare.username = true
source.sendFeedback({text:'Username selfcare on', color:'green'}) source.sendFeedback({text:'Username selfcare on', color:'green'})
break break
case 'skinon': case 'skinon':
bot.skin.on() bot.options.selfcare.skin = true
source.sendFeedback({text:'Skin selfcare on', color:'green'}) source.sendFeedback({text:'Skin selfcare on', color:'green'})
break break
case 'skinoff': case 'skinoff':
bot.skin.off() bot.options.selfcare.skin = false
source.sendFeedback({text:'Skin selfcare off', color:'red'}) source.sendFeedback({text:'Skin selfcare off', color:'red'})
break break
case 'cspyon': case 'cspyon':
bot.cspy.on() bot.options.selfcare.cspy = true
source.sendFeedback({text:'Cspy selfcare on', color:'green'}) source.sendFeedback({text:'Cspy selfcare on', color:'green'})
break break
case 'cspyoff': case 'cspyoff':
bot.cspy.off() bot.options.selfcare.cspy = false
source.sendFeedback({text:'Cspy selfcare off', color:'red'}) source.sendFeedback({text:'Cspy selfcare off', color:'red'})
break break
case 'nicknameon': case 'nicknameon':
bot.nickname.on() bot.options.selfcare.nickname= true
source.sendFeedback({text:'Nickname selfcare on', color:'green'}) source.sendFeedback({text:'Nickname selfcare on', color:'green'})
break break
case 'nicknameoff': case 'nicknameoff':
bot.nickname.off() bot.options.selfcare.nickname = false
source.sendFeedback({text:'Nickname selfcare off', color:'red'}) source.sendFeedback({text:'Nickname selfcare off', color:'red'})
break break
default: default:

View file

@ -12,12 +12,15 @@ const source = context.source
const { stylize } = require('../util/eval_colors') const { stylize } = require('../util/eval_colors')
const util = require('util') const util = require('util')
const args = context.arguments const args = context.arguments
const script = args.slice(1).join(' '); const script = args.slice(1).join(' ');
if (!args && !args[0] && !args[1] && !args[2] && !args[3] && !args[4] ) return if (!args && !args[0] && !args[1] && !args[2] && !args[3] && !args[4] ) return
try { try {
context.source.sendFeedback({ text: util.inspect(eval(script), { stylize }).substring(0, 32700) }) source.sendFeedback({ text: util.inspect(eval(script), { stylize }).substring(0, 32700) })
source.sendFeedback({ text: `Script input: ${script}` })
} catch (err) { } catch (err) {
context.source.sendFeedback({ text: err.message, color: 'red' }) source.sendFeedback({ text: err.message, color: 'red' })
source.sendFeedback({ text: `Script input: ${script}` })
} }
} }
} }

View file

@ -1,22 +0,0 @@
const CommandError = require('../CommandModules/command_error')
module.exports = {
name: 'testbench',
//<< this one line of code broke it lmao
description:[''],
aliases:['tstbench'],
trustLevel: 0,
execute (context) {
const bot = context.bot
const args = context.arguments
//bot.core.run(`tag ${context.source.player.profile.name} add bruhify`)
bot.bruhifyTextTellraw = args.join(' ')
}
}
//[%s] %s %s
//was it showing like that before?
// just do text bc too sus rn ig
// You should remove the with thing and the translate and replace

29
commands/website.js Normal file
View file

@ -0,0 +1,29 @@
const CommandError = require('../CommandModules/command_error')
//const fetch = import("node-fetch");
module.exports = {
name: 'website',
trustLevel:1,
aliases:['web','websitedata','webdata'],
description:['check website data'],
async execute (context) {
try{
const fetch = require("node-fetch");
const source = context.source
const bot = context.bot
const message = context.arguments.join(' ')
const args = context.arguments
if (!args && !args[0] && !args[1] && !args[2]) return
const response = await fetch(args[1]);
const body = await response.text();
bot.tellraw({text:body,color:'green'})
} catch(e) {
const bot = context.bot
const source = context.source
// source.sendFeedback({text:e.stack, color:'dark_red'})
source.sendFeedback({text:e.toString(), color:'dark_red'})
}
}
}

View file

@ -3,63 +3,38 @@
module.exports = { module.exports = {
bots: [ bots: [
{ {
host: "localhost", host: "server ip here or comment this out and refer to the bot.js file",
username:username(), version:"1.20.1",//version here
version:"1.20.1", reconnectDelay: 6000,
reconnectDelay: 6000, username:username(),
language:"lolus", console:true,
console:true,
input: true, input: true,
commands: {
MainPrefix: "set Main Prefix here",
SecondaryPrefix:'set Secondary prefix here',
TertiaryPrefix:'set Tertiary Prefix here'
},
Core: { Core: {
customName:"core customName here", customName:"core custom name here",
core: true, core: true,
}, interval:180000
discord: { },
channelId: "discord channelId here", discord: {
channelId: "discord channel ip here",
invite: "discord invite link here", invite: "discord invite link here",
commandPrefix: "discord command prefix here" commandPrefix: "discord command prefix here"
}, },
skin: { selfcare: {
torso:{ vanished: true,
jacket:true, unmuted: true,
cape:true, prefix: true,
},
arms: {
leftSleeve:true,
rightSleeve:true,
},
legs:{
leftPants:true,
rightPants:true,
},
head:{
hat:true
},
},
selfcare: {
unmuted: true,
vanished: true,
prefix: true,
skin: true,
cspy: true, cspy: true,
op: true, tptoggle:true,
gmc: true, skin:true,
username:true, gmc:true,
nickname: true, op:true,
god:true, nickname:true,
tptoggle: true, username:true,
interval:500, god: true,
} interval:500,
}, }
},
] ]
} }

119
index.js
View file

@ -1,53 +1,94 @@
const util = require('util') const util = require("util");
const createBot = require('./bot.js') const createBot = require("./bot.js");
//const chomensjs = require('./ChomensJS')
// TODO: Load a default config // TODO: Load a default config
const fs = require('fs/promises') const fs = require("fs");
const fileExist = require('./util/file-exists') const fileExist = require("./util/file-exists");
const path = require('path') const path = require("path");
const readline = require("readline");
function load () {
//const config = require('./config.js')
const readline = require('readline')
const rl = readline.createInterface({ const rl = readline.createInterface({
input: process.stdin, input: process.stdin,
output: process.stdout, output: process.stdout,
}) });
require('dotenv').config()
const bots = []
for (const options of config.bots) {
const bot = createBot(options)
bots.push(bot)
bot.bots = bots
bot.options.username
bot.console.useReadlineInterface(rl)
// bot.on('error', (error), util.inspect(error)) function load() {
//const config = require('./config.js')
try{ require("dotenv").config();
bot.on('error', console.error) const bots = [];
}catch(error){ for (const options of config.bots) {
const bot = createBot(options);
bots.push(bot);
bot.bots = bots;
bot.options.username;
bot.loadModule = (module) => module(bot, options);
console.log(error.stack) 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,
);
}
}
bot.console.useReadlineInterface(rl);
// bot.on('error', (error), util.inspect(error))
try {
bot.on("error", console.error);
} catch (error) {
console.log(error.stack);
}
}
} }
}
async function checkConfig () { const modules = "./modules";
if (!await fileExist(path.join(__dirname, 'config.js'))) { const util2 = "./util";
console.error('Config not found! Creating a new Config from ') const CommandModules = "./CommandModules";
await fs.copyFile(path.join(__dirname, 'default.js'), path.join(__dirname, 'config.js')) const commands = "./commands";
} if (await fileExist(path.join(__dirname, 'config.js'))){ const chat = "./chat";
console.log('Config found! loading config please wait,......') fs.readdir(util2, (err, files) => {
console.log("Successfully loaded: " + files.length + " util files");
});
fs.readdir(modules, (err, files) => {
console.log("Successfully loaded: " + files.length + " module files");
});
fs.readdir(commands, (err, files) => {
console.log("Successfully loaded: " + files.length + " command files");
});
fs.readdir(CommandModules, (err, files) => {
console.log("Successfully loaded: " + files.length + " CommandModule files");
});
fs.readdir(chat, (err, files) => {
console.log("Successfully loaded: " + files.length + " chat files");
});
async function checkConfig() {
if (!(await fileExist(path.join(__dirname, "config.js")))) {
console.error("Config not found! Creating a new Config from ");
await fs.copyFile(
path.join(__dirname, "default.js"),
path.join(__dirname, "config.js"),
);
}
if (await fileExist(path.join(__dirname, "config.js"))) {
console.log("Config found! loading config please wait,......");
} }
config = require('./config.js') config = require("./config.js");
load()
load();
} }
checkConfig() checkConfig();
process.on('uncaughtException', (e) => {
console.log('uncaught ' + e.stack)
})
process.on("uncaughtException", (e) => {
console.log("uncaught " + e.stack);
});

View file

@ -1,6 +1,6 @@
const convert = require('color-convert') const convert = require('color-convert')
function inject (bot) { function bruhify (bot) {
bot.bruhifyText = '' bot.bruhifyText = ''
let startHue = 0 let startHue = 0
const timer = setInterval(() => { const timer = setInterval(() => {
@ -18,10 +18,10 @@ let tag = 'bruhify'
bot.core.run(`minecraft:title @a actionbar ${JSON.stringify(component)}`) bot.core.run(`minecraft:title @a actionbar ${JSON.stringify(component)}`)
startHue = (startHue + increment) % 360 startHue = (startHue + increment) % 360
}, 50) }, 100)
bot.on('end', () => { bot.on('end', () => {
// clearInterval(timer) // clearInterval(timer)
}) })
} }
module.exports = inject module.exports = bruhify

View file

@ -13,7 +13,7 @@ function tryParse (json) {
} }
} }
//what was changed?? //what was changed??
function inject (bot) { function chat (bot, context) {
let ChatMessage let ChatMessage
bot.on('registry_ready', registry => { bot.on('registry_ready', registry => {
ChatMessage = loadPrismarineChat(registry) ChatMessage = loadPrismarineChat(registry)
@ -116,8 +116,172 @@ function inject (bot) {
}) })
} }
/*
bot.on('parsed_message', data => {
if (data.type !== 'minecraft:chat') return
const plainMessage = bot.getMessageAsPrismarine(data.contents)?.toString()
if (plainMessage.startsWith('amogus')) {
bot.chat('amongus is very sus &4&lඞ')
} return
})
bot.on('parsed_message', data => {
if (data.type !== 'minecraft:chat') return
const plainMessage = bot.getMessageAsPrismarine(data.contents)?.toString()
if (plainMessage.startsWith('fard')) {
bot.chat('fart')
} return
})
bot.on('parsed_message', data => {
if (data.type !== 'minecraft:chat') return
const plainMessage = bot.getMessageAsPrismarine(data.contents)?.toString()
if (plainMessage.startsWith('stroke')) {
bot.chat('&4&l&kfaslkjdfhlaskdjfhlaskjfhlakjdfhluiqwhefloewhfkjhasdlfkjhaldkfjhaslfdjhlhadfhlafdshlksajdfhkajsdfhkhjfaslkjdfhlaskdjfhlaskjfhlakjdfhluiqwhefloewhfkjhasdlfkjhaldkfjhaslfdjhlhadfhlafdshlksajdfhkajsdfhkhj')
} return
})/*
bot.on('parsed_message', data => {
if (data.type !== 'minecraft:chat') return
const plainMessage = bot.getMessageAsPrismarine(data.contents)?.toString()
if (plainMessage.startsWith('true')) {
bot.chat(' false')
} return
})
bot.on('parsed_message', data => {
if (data.type !== 'minecraft:chat') return
const plainMessage = bot.getMessageAsPrismarine(data.contents)?.toString()
if (plainMessage.startsWith('false')) {
bot.chat(' true')
} return
})
bot.on('parsed_message', data => {
if (data.type !== 'minecraft:chat') return
const plainMessage = bot.getMessageAsPrismarine(data.contents)?.toString()
if (plainMessage.startsWith('beep')) {
bot.chat('bee do ba')
} return
})
bot.on('parsed_message', data => {
if (data.type !== 'minecraft:chat') return
const plainMessage = bot.getMessageAsPrismarine(data.contents)?.toString()
if (plainMessage.startsWith('maniaplay')) {
bot.chat('&4[&c&lOP&4] &cmaniaplay: i hate command cores i hope everyone who uses them dies in their sleep 😊')
} return
})
bot.on('parsed_message', data => {
if (data.type !== 'minecraft:chat') return
const plainMessage = bot.getMessageAsPrismarine(data.contents)?.toString()
if (plainMessage.startsWith('null')) {
bot.chat('n u l l')
} return
})
bot.on('parsed_message', data => {
if (data.type !== 'minecraft:chat') return
const plainMessage = bot.getMessageAsPrismarine(data.contents)?.toString()
if (plainMessage.startsWith('undefined')) {
bot.chat('my brain is undefined')
} return
})
bot.on('parsed_message', data => {
if (data.type !== 'minecraft:chat') return
const plainMessage = bot.getMessageAsPrismarine(data.contents)?.toString()
if (plainMessage.startsWith('nya')) {
bot.chat(' nya~')
} return
})
bot.on('parsed_message', data => {
if (data.type !== 'minecraft:chat') return
const plainMessage = bot.getMessageAsPrismarine(data.contents)?.toString()
if (plainMessage.startsWith('mrrow')) {
bot.chat(' mrrow')
} return
})
bot.on('parsed_message', data => {
if (data.type !== 'minecraft:chat') return
const plainMessage = bot.getMessageAsPrismarine(data.contents)?.toString()
if (plainMessage.startsWith('uwu')) {
bot.chat(' OwO')
} return
})
bot.on('parsed_message', data => {
if (data.type !== 'minecraft:chat') return
const plainMessage = bot.getMessageAsPrismarine(data.contents)?.toString()
if (plainMessage.startsWith('owo')) {
bot.chat(' UwU')
} return
})
bot.on('parsed_message', data => {
if (data.type !== 'minecraft:chat') return
const plainMessage = bot.getMessageAsPrismarine(data.contents)?.toString()
if (plainMessage.startsWith('what time is it')) {
bot.chat('time for you to get a watch')
} return
})
bot.on('parsed_message', data => {
if (data.type !== 'minecraft:chat') return
const plainMessage = bot.getMessageAsPrismarine(data.contents)?.toString()
if (plainMessage.startsWith('69')) {
bot.chat('funni number')
} return
})
/* bot.on('parsed_message', data => {
if (data.type !== 'minecraft:chat') return
const plainMessage = bot.getMessageAsPrismarine(data.contents)?.toString()
if (plainMessage.startsWith('real')) {
bot.chat('very')
} return
})*/
bot.on('parsed_message', data => {
if (data.type !== 'minecraft:chat') return
const plainMessage = bot.getMessageAsPrismarine(data.contents)?.toString()
if (plainMessage.startsWith('meow')) {
bot.chat(' :3')
} return
})
bot.on('parsed_message', data => {
if (data.type !== 'minecraft:chat') return
const plainMessage = bot.getMessageAsPrismarine(data.contents)?.toString()
if (plainMessage.startsWith('qwerty')) {
bot.chat(' qwerty')
} return
})
/*
bot.on('parsed_message', data => {
if (data.type !== 'minecraft:chat') return
const plainMessage = bot.getMessageAsPrismarine(data.contents)?.toString()
if (plainMessage.startsWith('')) {
bot.chat('')
} return
})
*/
bot.command = command => { bot.command = command => {
bot._client.write('chat_command', { bot._client.write('chat_command', {
command, command,
@ -134,4 +298,4 @@ function inject (bot) {
bot.tellraw = (message, selector = '@a') => bot.core.run('minecraft:tellraw @a ' + JSON.stringify(message)) // ? Should this be here? bot.tellraw = (message, selector = '@a') => bot.core.run('minecraft:tellraw @a ' + JSON.stringify(message)) // ? Should this be here?
} }
module.exports = inject module.exports = chat

View file

@ -1,57 +1,89 @@
const CommandSource = require('../CommandModules/command_source') const CommandSource = require("../CommandModules/command_source");
const CommandError = require('../CommandModules/command_error') const CommandError = require("../CommandModules/command_error");
function inject (bot) { function chat_command_handler(bot) {
bot.on('parsed_message', data => { bot.on("parsed_message", (data) => {
if (data.type !== 'minecraft:chat') return if (data.type !== "minecraft:chat") return;
const plainMessage = bot.getMessageAsPrismarine(data.contents)?.toString() const plainMessage = bot.getMessageAsPrismarine(data.contents)?.toString();
if (!plainMessage.startsWith(bot.commandManager.MainPrefix) && (!plainMessage.startsWith(bot.commandManager.SecondaryPrefix) && (!plainMessage.startsWith(bot.commandManager.TertiaryPrefix)))) return if (
// else if (!plainMessage.startsWith(bot.commandManager.prefix2)) return !plainMessage.startsWith(bot.commandManager.MainPrefix) &&
// MainPrefix: "~", !plainMessage.startsWith(bot.commandManager.SecondaryPrefix) &&
// SecondaryPrefix:'%', !plainMessage.startsWith(bot.commandManager.TertiaryPrefix)
//TertiaryPrefix:'@' )
return;
// else if (!plainMessage.startsWith(bot.commandManager.prefix2)) return
// MainPrefix: "~",
// SecondaryPrefix:'%',
//TertiaryPrefix:'@'
const command = plainMessage.substring(bot.commandManager.MainPrefix.length || plainMessage.substring(bot.commandManager.SecondaryPrefix.length || plainMessage.substring(bot.commandManager.TertiaryPrefix.length))) // if the prefixes are the same length just make it 1 or the length const command = plainMessage.substring(
bot.commandManager.MainPrefix.length ||
plainMessage.substring(
bot.commandManager.SecondaryPrefix.length ||
plainMessage.substring(bot.commandManager.TertiaryPrefix.length),
),
); // if the prefixes are the same length just make it 1 or the length
/* /*
lifes sus lifes sus
*/ */
const source = new CommandSource(data.sender, { discord: false, console: false }, true) const source = new CommandSource(
source.sendFeedback = message => { data.sender,
{ discord: false, console: false },
true,
);
source.sendFeedback = (message) => {
const prefix = { const prefix = {
translate: '[%s%s%s] \u203a ', translate: "[%s%s%s] \u203a ",
bold: false, bold: false,
color: 'dark_gray', color: "dark_gray",
with: [ with: [
{
color: 'dark_purple',
text: 'FNF',
bold:true,
hoverEvent: { action:"show_text", value: `${process.env["buildstring"]}\n${process.env["FoundationBuildString"]}`},
clickEvent: bot.options.Core.customName ? { action: 'open_url', value: bot.options.Core.customName } : undefined,
},
{ {
color: 'aqua', color: "dark_purple",
text: 'Boyfriend', bold:true, text: "FNF",
clickEvent: bot.options.discord.invite ? { action: 'open_url', value: bot.options.discord.invite } : undefined, hoverEvent: { action:"show_text", value: `Bot Username: ${bot.username}\nBot UUID: ${bot.uuid}\nServer Host: ${bot.options.host}:${bot.options.port}\nBot Minecraft Java Version: ${bot.options.version}`}, bold: true,
hoverEvent: {
action: "show_text",
value: `${process.env["buildstring"]}\n${process.env["FoundationBuildString"]}`,
},
clickEvent: bot.options.Core.customName
? { action: "open_url", value: bot.options.Core.customName }
: undefined,
}, },
{ color: 'dark_red', {
text: 'Bot', color: "#00FFFF",
bold:true, text: "Boyfriend",
clickEvent: bot.options.discord.invite ? { action: 'open_url', value: 'https://code.chipmunk.land' } : undefined, bold: true,
hoverEvent: { action:"show_text", value: '§aMan i like frogs - _ChipMC_'}, clickEvent: bot.options.discord.invite
},//§aMan i like frogs - _ChipMC_ ? { action: "open_url", value: bot.options.discord.invite }
: undefined,
hoverEvent: {
action: "show_text",
value: `Bot Username: ${bot.username}\nBot UUID: ${bot.uuid}\nServer Host: ${bot.options.host}:${bot.options.port}\nBot Minecraft Java Version: ${bot.options.version}`,
},
},
{
color: "dark_red",
text: "Bot",
bold: true,
clickEvent: bot.options.discord.invite
? { action: "open_url", value: "https://code.chipmunk.land" }
: undefined,
hoverEvent: {
action: "show_text",
value: "§aMan i like frogs - _ChipMC_",
},
}, //§aMan i like frogs - _ChipMC_
{ color: 'green', text: command.split(' ')[0] } { color: "green", text: command.split(" ")[0] },
] ],
} };
bot.tellraw(['', prefix, message]) bot.tellraw(["", prefix, message]);
} };
bot.commandManager.executeString(source, command) bot.commandManager.executeString(source, command);
});
})
} }
module.exports = inject module.exports = chat_command_handler;

View file

@ -1,5 +1,5 @@
const nbt = require('prismarine-nbt'); const nbt = require('prismarine-nbt');
async function inject (bot, options) { async function command_core (bot, options) {
bot.core = { bot.core = {
// what you think im doing? look at line 17 // what you think im doing? look at line 17
area: { area: {
@ -15,7 +15,7 @@ async function inject (bot, options) {
if (!pos) return if (!pos) return
bot.command(`fill ${pos.x + start.x} ${pos.y + start.y} ${pos.z + start.z} ${pos.x + end.x} ${pos.y + end.y} ${pos.z + end.z} repeating_command_block{CustomName: '{"text":"${bot.options.Core.customName}","color":"dark_red","clickEvent":{"action":"open_url","value":"${bot.options.Core.customName}"}}'} destroy`) bot.command(`fill ${pos.x + start.x} ${pos.y + start.y} ${pos.z + start.z} ${pos.x + end.x} ${pos.y + end.y} ${pos.z + end.z} repeating_command_block{CustomName: '{"text":"${bot.options.Core.customName}","color":"#00FFFF","clickEvent":{"action":"open_url","value":"https://chipmunk.land"}}'} destroy`)
}, },
@ -71,6 +71,16 @@ async function inject (bot, options) {
}, },
} }
/*
bot.on('parsed_message', data => {
if (data.type !== 'minecraft:chat') return
const plainMessage = bot.getMessageAsPrismarine(data.contents)?.toString()
if (plainMessage.startsWith(':3')) {
bot.chat(' :3')
} return
})
*/
if (!bot.options.Core.core) return if (!bot.options.Core.core) return
bot.on('move', () => { bot.on('move', () => {
bot.core.move(bot.position) bot.core.move(bot.position)
@ -82,7 +92,8 @@ async function inject (bot, options) {
}, bot.options.Core.interval) }, bot.options.Core.interval)
bot.on('end', (bot) => { bot.on('end', (bot) => {
clearInterval(timer) clearInterval(timer)
}) })
}) })
} }
module.exports = inject module.exports = command_core

View file

@ -1,4 +1,4 @@
function inject (bot, options) { function command_loop_manager (bot, options) {
bot.cloop = { bot.cloop = {
list: [], list: [],
@ -16,6 +16,7 @@ function inject (bot, options) {
this.list = [] this.list = []
} }
} }
} }
module.exports = inject module.exports = command_loop_manager

View file

@ -1,214 +1,185 @@
const fs = require('fs') const fs = require("fs");
const path = require('path') const path = require("path");
const CommandError = require('../CommandModules/command_error.js') const CommandError = require("../CommandModules/command_error.js");
//check command_source //check command_source
//it would be both the command_source.js and command_manager.js files //it would be both the command_source.js and command_manager.js files
function inject (bot, options) { function command_manager(bot, options) {
bot.commandManager = { bot.commandManager = {
MainPrefix: options.commands?.MainPrefix ?? 'default', MainPrefix: options.commands.MainPrefix ?? "default",
SecondaryPrefix: options.commands?.SecondaryPrefix ?? 'default', SecondaryPrefix: options.commands.SecondaryPrefix ?? "default",
TertiaryPrefix: options.commands?.TertiaryPrefix ?? 'default', TertiaryPrefix: options.commands.TertiaryPrefix ?? "default",
commands: {}, commands: {},
amogus: [], commandlist: [],
//ohio //ohio
execute (source, commandName, args, message) { execute(source, commandName, args, message) {
const command = this.getCommand(commandName.toLowerCase()) const command = this.getCommand(commandName.toLowerCase());
//Unknown command. Type "/help" for help //Unknown command. Type "/help" for help
const now = new Date().toLocaleString("en-US",{timeZone:"America/CHICAGO"}) const now = new Date().toLocaleString("en-US", {
timeZone: "America/CHICAGO",
});
try { try {
if (!command || !command.execute) throw new CommandError({ translate: `Unknown command %s. Type "${bot.options.commands.MainPrefix}help" for help or click on this for the command`, with: [commandName], clickEvent: bot.options.Core.customName ? { action: 'suggest_command', value: `${bot.options.commands.MainPrefix}help` } : undefined})//ohio if (!command || !command.execute)
throw new CommandError({
translate: `Unknown command %s. Type "${bot.options.commands.MainPrefix}help" for help or click on this for the command`,
with: [commandName],
clickEvent: bot.options.Core.customName
? {
action: "suggest_command",
value: `${bot.options.commands.MainPrefix}help`,
}
: undefined,
}); //ohio
if (command.trustLevel > 0) {
const event = source?.discordMessageEvent;
const roles = event?.member?.roles?.cache;
if (command.trustLevel > 0){ if (
const event = source?.discordMessageEvent source?.sources?.discord &&
command.trustLevel === 1 &&
!roles?.some(
(role) =>
role?.name == "trusted" ||
role?.name == "FNFBoyfriendBot Owner",
)
? true
: false
)
throw new CommandError({
text: "You are not Trusted!",
color: "red",
});
if (
!source?.sources?.discord &&
command.trustLevel === 1 &&
args[0] !== bot.hash &&
args[0] !== bot.owner &&
args[0] !== bot.hashing.hash
)
throw new CommandError({
text: "Invalid Hash or Invalid Owner Hash",
color: "red",
});
bot.hashing.updateHash();
const now = new Date().toLocaleString("en-US", {
timeZone: "America/CHICAGO",
});
const player = source?.player?.profile?.name;
const uuid = source?.player?.uuid;
const time = new Date().toLocaleTimeString("en-US", {
timeZone: "America/CHICAGO",
});
const date = new Date().toLocaleDateString("en-US", {
timeZone: "America/CHICAGO",
});
const roles = event?.member?.roles?.cache bot.console.hash = function (error, source) {
console.log(
// message.member.displayName `<\x1b[0m\x1b[35m${time} \x1b[0m\x1b[96m${date}\x1b[0m> [${bot.options.host}:${bot.options.port}\x1b[0m] ` +
//const hash = `${args[0]}` // this is undefined `[\x1b[0m\x1b[92mHash\x1b[0m]: \x1b[0m\x1b[92mPlayer\x1b[0m: ${player}, \x1b[0m\x1b[92mUUID\x1b[0m:${uuid}, \x1b[0m\x1b[92mHash\x1b[0m:${
//const owner = `${args[0]}` bot.hash || bot.hashing.hash
// const hash = `${args[0]}` }\x1b[0m]`,
// const owner = `${args[0]}` );
if( };
source?.sources?.discord && bot.console.discordHash = function (error, source) {
command.trustLevel === 1 && console.log(
!roles?.some(role => role?.name == 'trusted' || role?.name == 'FNFBoyfriendBot Owner') ? true : false `<\x1b[0m\x1b[35m${time} \x1b[0m\x1b[96m${date}\x1b[0m> [${bot.options.host}:${bot.options.port}\x1b[0m] ` +
) throw new CommandError({text:'You are not Trusted!', color:'red'}) `[\x1b[0m\x1b[92mHash\x1b[0m]: \x1b[0m\x1b[92mPlayer\x1b[0m: ${player}, \x1b[0m\x1b[92mUUID\x1b[0m:${uuid}, \x1b[0m\x1b[92mHash\x1b[0m:${bot.hashing.hash}\x1b[0m]`,
if ( );
!source?.sources?.discord && };
command.trustLevel === 1 && bot.console.ownerHash = function (error, source) {
args[0] !== bot.hash && console.log(
args[0] !== bot.owner && `<\x1b[0m\x1b[35m${time} \x1b[0m\x1b[96m${date}\x1b[0m> [${bot.options.host}:${bot.options.port}\x1b[0m] ` +
args[0] !== bot.hashing.hash `[\x1b[0m\x1b[31mOwnerHash\x1b[0m]: \x1b[0m\x1b[92mPlayer\x1b[0m: ${player}, \x1b[0m\x1b[92mUUID\x1b[0m:${uuid}, \x1b[0m\x1b[31mOwnerHash\x1b[0m:${bot.owner}\x1b[0m]`,
) throw new CommandError({text:'Invalid Hash or Invalid Owner Hash', color:'red'}) );
bot.hashing.updateHash() };
const now = new Date().toLocaleString("en-US",{timeZone:"America/CHICAGO"})
const player = source?.player?.profile?.name
const uuid = source?.player?.uuid
const time = new Date().toLocaleTimeString("en-US", {timeZone:"America/CHICAGO"})
const date = new Date().toLocaleDateString("en-US", {timeZone:"America/CHICAGO"})
bot.console.hash = function (error, source) {
console.log(`<\x1b[0m\x1b[35m${time} \x1b[0m\x1b[96m${date}\x1b[0m> [${bot.options.host}:${bot.options.port}\x1b[0m] ` + `[\x1b[0m\x1b[92mHash\x1b[0m]: \x1b[0m\x1b[92mPlayer\x1b[0m: ${player}, \x1b[0m\x1b[92mUUID\x1b[0m:${uuid}, \x1b[0m\x1b[92mHash\x1b[0m:${bot.hash || bot.hashing.hash}\x1b[0m]` )
}
bot.console.discordHash = function (error, source) {
console.log(`<\x1b[0m\x1b[35m${time} \x1b[0m\x1b[96m${date}\x1b[0m> [${bot.options.host}:${bot.options.port}\x1b[0m] ` + `[\x1b[0m\x1b[92mHash\x1b[0m]: \x1b[0m\x1b[92mPlayer\x1b[0m: ${player}, \x1b[0m\x1b[92mUUID\x1b[0m:${uuid}, \x1b[0m\x1b[92mHash\x1b[0m:${bot.hashing.hash}\x1b[0m]` )
}
bot.console.ownerHash = function (error, source) {
console.log(`<\x1b[0m\x1b[35m${time} \x1b[0m\x1b[96m${date}\x1b[0m> [${bot.options.host}:${bot.options.port}\x1b[0m] ` + `[\x1b[0m\x1b[31mOwnerHash\x1b[0m]: \x1b[0m\x1b[92mPlayer\x1b[0m: ${player}, \x1b[0m\x1b[92mUUID\x1b[0m:${uuid}, \x1b[0m\x1b[31mOwnerHash\x1b[0m:${bot.owner}\x1b[0m]` )
}
if (args[0] === bot.hash) { if (args[0] === bot.hash) {
bot.console.hash() bot.console.hash();
} else if (args[0] === bot.owner) {
bot.console.ownerHash();
} }
else if (args[0] === bot.owner) { if (
bot.console.ownerHash() source?.sources?.discord &&
} command.trustLevel === 2 &&
if ( !roles?.some((role) => role.name === "FNFBoyfriendBot Owner")
source?.sources?.discord && )
command.trustLevel === 2 && throw new CommandError({
!roles?.some(role => role.name === 'FNFBoyfriendBot Owner') text: "You are not the Owner!",
) throw new CommandError({text:'You are not the Owner!', color:'dark_red'}) color: "dark_red",
const owner = `${args[0]}` });
if ( const owner = `${args[0]}`;
!source?.sources?.discord && if (
command.trustLevel === 2 && owner !== bot.owner !source?.sources?.discord &&
)throw new CommandError({text: 'Invalid Owner Hash', color:'dark_red'}) command.trustLevel === 2 &&
owner !== bot.owner
)
throw new CommandError({
text: "Invalid Owner Hash",
color: "dark_red",
});
if (command.trustLevel === 3 && !source?.sources?.console) throw new CommandError({ translate: 'This command can only be executed via console', color: 'blue' }) if (command.trustLevel === 3 && !source?.sources?.console)
//if () throw new CommandError({
}// if (command.consoleOnly && !source.sources.console) throw new CommandError({ translate: 'This command can only be executed via console', color: 'blue' }) translate: "This command can only be executed via console",
//(hash !== bot.hash && owner !== bot.owner color: "blue",
//command.unknown.argument command.unknown.command });
//command.context.here }
// let hash = 1 return command.execute({ bot, source, arguments: args });
// let owner = 2
//command.hashOnly && command.ownerOnly && args.length !== 0 && source.hash && source.owner
// if (command.hashOnly && args.length === 0) throw new CommandError({ translate: 'Please provide a hash or a OwnerHash', color: 'red' })
//<\x1b[0m\x1b[35m${time} \x1b[0m\x1b[96m${date}\x1b[0m> [${bot.options.host}:${bot.options.port}\x1b[0m] ` + `[\x1b[0m\x1b[92mHash\x1b[0m]: \x1b[0m\x1b[92mPlayer\x1b[0m: ${player}, \x1b[0m\x1b[92mUUID\x1b[0m:${uuid}, \x1b[0m\x1b[92mHash\x1b[0m:${bot.hash}\x1b[0m]`
// actual hash
//but look in hashing.js
//im looking through chomensjs's command handler for reference
//💀
// <\x1b[0m\x1b[35m${time} \x1b[0m\x1b[96m${date}\x1b[0m> [${bot.options.host}:${bot.options.port}\x1b[0m] ` + `[\x1b[0m\x1b[31mOwnerHash\x1b[0m]: \x1b[0m\x1b[92mPlayer\x1b[0m: ${player}, \x1b[0m\x1b[92mUUID\x1b[0m:${uuid}, \x1b[0m\x1b[31mOwnerHash\x1b[0m:${bot.owner}\x1b[0m]
//command.hashOnly && source.sources.discord
//supposed to be a command error for invalid hash
// if (command.hashOnly && args.length === 0) throw new CommandError({ translate: 'Please provide a hash or a OwnerHash', color: 'red' })
// {text:'Invalid Trusted hash or invalid Owner Hash', color:'red'}
// you cant do a empty if
// but i didnt know it can be just undefined :skull:
//sus
//commented smh out about and ig that worked
// sus
// if("e") {} // ok
// idfk how to explain but it does
// real (there was no if)
// isnt it if(something) {} or i
//if(
// )//tf
/*
if (command.trustLevel > 0) {
const discordRoles = message.member?.roles?.cache
if(
sources.source.discord &&
command.trustLevel === 1 &&
!discordRoles.some((role) => role.name === 'trusted' ||
role.name === 'FNFBoyfriendBot Owner')
)throw new CommandError({text:'You are not trusted!', color:'red'})
let hash
let owner
if (
!sources.source.discord &&
command.trustLevel === 1 &&
args.shift() !== hash &&
args.shift() !== owner
)
*/
// just shift it out of the args (mabe would help with needing to do cloop e add 1 say hi)
//idfk
//tf
// why the fard did it include the comment in the eror it sent
//so replace args[0] with arg.shift()
// just do args.shift()
// or mabe const hasharg = args.shift()
// idk
//aaa
//expression expected
//ik that but why tf is it erroring
// wat the fard
// sus
return command.execute({ bot, source, arguments: args })
} catch (error) { } catch (error) {
const now = new Date().toLocaleString("en-US",{timeZone:"America/CHICAGO"}) const now = new Date().toLocaleString("en-US", {
bot.console.warn(error.stack)//const filename of fs.readdirSync(path.join(__dirname, '../commands' timeZone: "America/CHICAGO",
//console.error('Failed to load command', filename, ':', error) });
//${path.join(__dirname, '..')} bot.console.warn(error.stack);
//const filename of fs.readdirSync(path.join(__dirname, '../commands' if (error instanceof CommandError) source.sendError(error._message);
//filenames.forEach(function(filename) {
//fs.readFile(dirname + filename, 'utf-8', function(err, content) {
else
if (error instanceof CommandError) source.sendError(error._message) source.sendError({
// translate: "An Error has occured because the bot shot itself 🔫",
// else source.sendError({ text:String(error.stack), color:'red' }) color: "red",
else source.sendError({ translate: 'A Error has occured because the bot shot itself 🔫', color:'red', hoverEvent: { action: 'show_text', contents: String(error.stack) } }) hoverEvent: { action: "show_text", contents: String(error.stack) },
});
if (source.sources.discord) { if (source.sources.discord) {
source.sendError(error) source.sendError(error);
} }
} }
}, },
// else source.sendError({ translate: 'command.failed', hoverEvent: { action: 'show_text', contents: String(error.message) } })
executeString (source, command) { executeString(source, command) {
const [commandName, ...args] = command.split(' ') const [commandName, ...args] = command.split(" ");
return this.execute(source, commandName, args) return this.execute(source, commandName, args);
}, },
register (command) { register(command) {
this.commands[command.name] = command this.commands[command.name] = command;
if(command.aliases) { if (command.aliases) {
command.aliases.map(a => this.commands[a] = command) command.aliases.map((a) => (this.commands[a] = command));
} }
}, },
getCommand (name) { getCommand(name) {
return this.commands[name] return this.commands[name];
}, },
getCommands () { getCommands() {
return Object.values(this.commands) return Object.values(this.commands);
} },
} };
// //
amogus = [] commandlist = [];
for (const filename of fs.readdirSync(path.join(__dirname, "../commands"))) {
for (const filename of fs.readdirSync(path.join(__dirname, '../commands'))) {
try { try {
const command = require(path.join(__dirname, '../commands', filename)) const command = require(path.join(__dirname, "../commands", filename));
bot.commandManager.register(command) bot.commandManager.register(command);
bot.commandManager.amogus.push(command) bot.commandManager.commandlist.push(command);
} catch (error) { } catch (error) {
console.error('Failed to load command', filename, ':', error) console.error("Failed to load command", filename, ":", error);
} }
if (process.env['anti-skid'] !== 'amogus is sus') { if (process.env["anti-skid"] !== "amogus is sus") {
process.exit(0) process.exit(0);
}
} }
} }
} module.exports = command_manager;
module.exports = inject

View file

@ -1,114 +1,88 @@
const CommandSource = require('../CommandModules/command_source') const CommandSource = require("../CommandModules/command_source");
//const logger = require('../util/logger') //const logger = require('../util/logger')
function inject (bot, options, context, source) { function Console(bot, options, context, source) {
bot.console = { bot.console = {
readline: null, readline: null,
username:bot.username, username: bot.username,
consoleServer: 'all', consoleServer: "all",
//bot._client.username, //bot._client.username,
useReadlineInterface (rl) { useReadlineInterface(rl) {
this.readline = rl this.readline = rl;
rl.on("line", (line) => {
if (
bot.options.host !== this.consoleServer &&
this.consoleServer !== "all"
)
return;
if (line.startsWith(".")) {
return bot.commandManager.executeString(
bot.console.source,
rl.on('line', line => { line.substring(1),
if (bot.options.host !== this.consoleServer && this.consoleServer !== 'all') return //null
`${process.env["FNFBoyfriendBot_Owner_key"]}`,
);
}
if (line === ",kill") process.exit();
if (line === ",reconnect") bot._client.end();
if (line.startsWith('.')) { //probably gotta somehow have it get its username
return bot.commandManager.executeString( //tried that already didnt work just errored
bot.console.source, //profile or smh :shrug:
line.substring(1),
//null
`${process.env["FNFBoyfriendBot_Owner_key"]}`
)
}
if (line === ',kill') process.exit()
if (line === ',reconnect') bot._client.end()
//probably gotta somehow have it get its username
//tried that already didnt work just errored
//profile or smh :shrug:
// what does it have to be // what does it have to be
if (line.startsWith('')){ if (line.startsWith("")) {
return bot.commandManager.executeString( return bot.commandManager.executeString(
bot.console.source, bot.console.source,
'console ' + line.substring(0) "console " + line.substring(0),
) );
} }
//bot.commandManager.executeString(bot.console.source, line)
});
const now = new Date().toLocaleString("en-US", {
timeZone: "America/CHICAGO",
});
const time = new Date().toLocaleTimeString("en-US", {
timeZone: "America/CHICAGO",
});
const date = new Date().toLocaleDateString("en-US", {
timeZone: "America/CHICAGO",
});
// const source = context.source
const prefix = `<\x1b[0m\x1b[35m${time} \x1b[0m\x1b[96m${date}\x1b[0m> [${bot.options.host}:${bot.options.port}\x1b[0m] `;
function log(...args) {
rl.output.write("\x1b[2K\r");
console.log(args.toString());
rl._refreshLine();
}
//bot.commandManager.executeString(bot.console.source, line) bot.console.warn = function (error) {
log(prefix + `[\x1b[0m\x1b[93mWARN\x1b[0m]: ${error}`);
};
bot.console.error = function (error) {
log(prefix + `[\x1b[0m\x1b[31mERROR\x1b[0m]: ${error}`);
};
}) bot.console.info = function (message) {
log(prefix + `[\x1b[0m\x1b[32mInfo\x1b[0m]: ` + message);
};
bot.console.log = function (message, ansi) {
log(prefix + `[\x1b[0m\x1b[33mLOGS\x1b[0m]: ` + message);
};
bot.console.debug = function (message, ansi) {
log(prefix + `[\x1b[0m\x1b[33mDEBUG\x1b[0m]: ` + message);
};
/* const ansimap = {
/*
function prefix (prefix, _message) {
const now = new Date().toLocaleString("en-US",{timeZone:"America/CHICAGO"})
const message = `[${now} \x1b[0m\x1b[33mLOGS\x1b[0m] [${bot.options.host}:${bot.options.port}]`
}
*/
//date.toLocaleDateString() for the date part, and date.toLocaleTimeString()
const now = new Date().toLocaleString("en-US",{timeZone:"America/CHICAGO"})
const time = new Date().toLocaleTimeString("en-US", {timeZone:"America/CHICAGO"})
const date = new Date().toLocaleDateString("en-US", {timeZone:"America/CHICAGO"})
// const source = context.source
const prefix = `<\x1b[0m\x1b[35m${time} \x1b[0m\x1b[96m${date}\x1b[0m> [${bot.options.host}:${bot.options.port}\x1b[0m] `
function log (...args) {
rl.output.write('\x1b[2K\r')
console.log(args.toString())
rl._refreshLine()
};
bot.console.warn = function (error) {
log(prefix + `[\x1b[0m\x1b[93mWARN\x1b[0m]: ${error}`)
}
bot.console.error = function (error) {
log(prefix + `[\x1b[0m\x1b[31mERROR\x1b[0m]: ${error}`)
}
bot.console.info = function (message) {
log(prefix + `[\x1b[0m\x1b[32mInfo\x1b[0m]:` + message)
}
bot.console.log = function (message, ansi) {
log(prefix + `[\x1b[0m\x1b[33mLOGS\x1b[0m]: ` + message)
}
bot.console.debug = function (message, ansi) {
log(prefix + `[\x1b[0m\x1b[33mDEBUG\x1b[0m]: ` + message)
}
/*
const player = source.player.profile.name
const uuid = source.player.uuid
console.log(`[${now} \x1b[0m\x1b[91mHash\x1b[0m] [\x1b[0m\x1b[92mSender: ${player}, uuid:${uuid}, hash:${bot.hash}\x1b[0m]`)
*/
/* const ansimap = {
0: '\x1b[0m\x1b[30m', 0: '\x1b[0m\x1b[30m',
1: '\x1b[0m\x1b[34m', 1: '\x1b[0m\x1b[34m',
2: '\x1b[0m\x1b[32m', 2: '\x1b[0m\x1b[32m',
@ -131,63 +105,69 @@ const date = new Date().toLocaleDateString("en-US", {timeZone:"America/CHICAGO"}
n: '\x1b[4m', n: '\x1b[4m',
m: '\x1b[9m', m: '\x1b[9m',
k: '\x1b[6m' k: '\x1b[6m'
}*/ /*return bot.commandManager.executeString( }*/
bot.username, const isConsole = bot.username ? true : false;
options.commands.prefix + line.substring(1), bot.console.source = new CommandSource(bot.username, {
bot.uuid, console: true,
null, discord: false,
});
bot.console.source.sendFeedback = (message) => {
)*/ const ansi = bot.getMessageAsPrismarine(message)?.toAnsi();
// bot.username if (!bot.options.input) return;
//const amogus = username, if (!bot.options.console) return;
bot.console.info(ansi);
};
//name: message?.member?.displayName bot.on("parsed_message", (data) => {
const isConsole = bot.username ? true : false if (data.type !== "minecraft:chat") return;
bot.console.source = new CommandSource( bot.username,{console:true, discord:false });
bot.console.source.sendFeedback = message => {
//profile:{displayName:bot.username}
const ansi = bot.getMessageAsPrismarine(message)?.toAnsi()
if (!bot.options.input) return const plainMessage = bot
if (!bot.options.console) return .getMessageAsPrismarine(data.contents)
bot.console.log(ansi) ?.toString();
if (plainMessage.startsWith("frog")) {
bot.chat("frok :)");
}
return;
});
bot.on("message", (message) => {
function log(...args) {
rl.output.write("\x1b[2K\r");
console.log(args.toString());
rl._refreshLine();
}
const time = new Date().toLocaleTimeString("en-US", {
timeZone: "America/CHICAGO",
});
const date = new Date().toLocaleDateString("en-US", {
timeZone: "America/CHICAGO",
});
const prefixy = `<\x1b[0m\x1b[35m${time} \x1b[0m\x1b[96m${date}\x1b[0m> [${bot.options.host}:${bot.options.port}\x1b[0m] `;
} bot.console.logs = function (message, ansi) {
log(prefixy + `[\x1b[0m\x1b[33mLOGS\x1b[0m]: ` + message);
};
const lang = require(`../util/language/lolus.json`);
const ansi = bot.getMessageAsPrismarine(message)?.toAnsi(lang);
const string = bot.getMessageAsPrismarine(message)?.toString();
bot.on('message', message => { const now = new Date().toLocaleString("en-US", {
function log (...args) { timeZone: "America/CHICAGO",
rl.output.write('\x1b[2K\r') });
console.log(args.toString()) const time2 = new Date().toLocaleTimeString("en-US", {
rl._refreshLine() timeZone: "America/CHICAGO",
});
const date2 = new Date().toLocaleDateString("en-US", {
timeZone: "America/CHICAGO",
});
if (!bot.options.input) return;
if (!bot.options.console) return;
bot.console.logs(`${ansi}`);
});
},
}; };
const time = new Date().toLocaleTimeString("en-US", {timeZone:"America/CHICAGO"})
const date = new Date().toLocaleDateString("en-US", {timeZone:"America/CHICAGO"})
const prefixy = `<\x1b[0m\x1b[35m${time} \x1b[0m\x1b[96m${date}\x1b[0m> [${bot.options.host}:${bot.options.port}\x1b[0m] `
bot.console.logs = function (message, ansi) {
log(prefixy + `[\x1b[0m\x1b[33mLOGS\x1b[0m]: ` + message)
}
const lang = require(`../util/language/${bot.options.language}.json`)
const ansi = bot.getMessageAsPrismarine(message)?.toAnsi(lang)
const string = bot.getMessageAsPrismarine(message)?.toString()
const now = new Date().toLocaleString("en-US",{timeZone:"America/CHICAGO"})
// const logtag = (JSON.stringify({"text":"[LOGS]", "color":"#00FF00"}))
const time2 = new Date().toLocaleTimeString("en-US", {timeZone:"America/CHICAGO"})
const date2 = new Date().toLocaleDateString("en-US", {timeZone:"America/CHICAGO"})
//const prefix = `<${time2} ${date2}> [${bot.options.host}:${bot.options.port}] `
if (!bot.options.input) return
if (!bot.options.console) return
bot.console.logs(`${ansi}`)
})
} }
}//const prefix = `<\x1b[0m\x1b[35m${time} \x1b[0m\x1b[96m${date}\x1b[0m> [${bot.options.host}:${bot.options.port}\x1b[0m] ` module.exports = Console;
}
module.exports = inject
/*const message = `[${moment().format('DD/MM/YY HH:mm:ss')} ${prefix}§r] [${bot.server.host}] `
const component = chatMessage.MessageBuilder.fromString(message).toJSON()
*/

View file

@ -9,7 +9,7 @@ const client = new Client({ intents: [Guilds, GuildMessages, MessageContent] })
const util = require('util') const util = require('util')
client.login(process.env.discordtoken) client.login(process.env.discordtoken)
function inject (bot, options) { function discord (bot, options) {
if (!options.discord?.channelId) { if (!options.discord?.channelId) {
bot.discord = { invite: options.discord?.invite } bot.discord = { invite: options.discord?.invite }
return return
@ -74,7 +74,7 @@ function inject (bot, options) {
*/ */
//`\`\`\`\n \n\`\`\` //`\`\`\`\n \n\`\`\`
function sendComponent (message) { function sendComponent (message) {
const lang = require(`../util/language/${bot.options.language}.json`) const lang = require(`../util/language/lolus.json`)
const ansi = bot.getMessageAsPrismarine(message).toAnsi(lang).replaceAll('```\u001b[9```' + '```\u001b[3```')// I have a function to fix ansi :shrug: const ansi = bot.getMessageAsPrismarine(message).toAnsi(lang).replaceAll('```\u001b[9```' + '```\u001b[3```')// I have a function to fix ansi :shrug:
/* /*
@ -202,6 +202,15 @@ function inject (bot, options) {
//sendDiscordMessage(reason) //sendDiscordMessage(reason)
}) })
bot.on('parsed_message', data => {
if (data.type !== 'minecraft:chat') return
const plainMessage = bot.getMessageAsPrismarine(data.contents)?.toString()
if (plainMessage.startsWith('purr')) {
bot.chat(' puuuuuuuuuurrrrrrrrrrrr~')
} return
})
/*bot.on('end', (reason, event) => { /*bot.on('end', (reason, event) => {
sendDiscordMessage('event:' + event) sendDiscordMessage('event:' + event)
sendDiscordMessage('Reason:' + util.inspect(reason)) sendDiscordMessage('Reason:' + util.inspect(reason))
@ -244,4 +253,4 @@ function fixansi(message) {
} }
} }
// //
module.exports = inject module.exports = discord

View file

@ -3,7 +3,7 @@
const crypto = require('crypto') const crypto = require('crypto')
const ownerkey = process.env['FNFBoyfriendBot_Owner_key'] const ownerkey = process.env['FNFBoyfriendBot_Owner_key']
const trustedkey = process.env['FNFBoyfriendBot_key'] const trustedkey = process.env['FNFBoyfriendBot_key']
function inject(bot) { function hashgen (bot) {
bot.hash = '' bot.hash = ''
bot.owner = '' bot.owner = ''
bot.updatehashes = update bot.updatehashes = update
@ -35,7 +35,14 @@ function inject(bot) {
}) })
*/ */
} }
bot.on('parsed_message', data => {
if (data.type !== 'minecraft:chat') return
const plainMessage = bot.getMessageAsPrismarine(data.contents)?.toString()
if (plainMessage.startsWith('fnf sky')) {
bot.chat('sky the fangirl!?!? i simp for her :)')
} return
})
let _hash = generateHash() let _hash = generateHash()
const now = new Date().toLocaleString("en-US",{timeZone:"America/CHICAGO"}) const now = new Date().toLocaleString("en-US",{timeZone:"America/CHICAGO"})
const time = new Date().toLocaleTimeString("en-US", {timeZone:"America/CHICAGO"}) const time = new Date().toLocaleTimeString("en-US", {timeZone:"America/CHICAGO"})
@ -71,7 +78,7 @@ const date = new Date().toLocaleDateString("en-US", {timeZone:"America/CHICAGO"}
function generateHash () { function generateHash () {
return crypto.randomBytes(4).toString('hex') return crypto.randomBytes(4).toString('hex')
} }
module.exports = inject module.exports = hashgen

View file

@ -1,35 +1,52 @@
function memusage (bot, options){ function memusage(bot, options) {
const clamp = require('../util/clamp') const clamp = require("../util/clamp");
const title = 'Memusage' const bossbarName = "memusage";
const os = require('os') const os = require("os");
let enabled = false let enabled = false;
let tag = 'FNFBoyfriendBotMemusage' let tag = "FNFBoyfriendBotMemusage";
bot.memusage = { bot.memusage = {
on () { on() {
enabled = true enabled = true;
}, },
off () { off() {
enabled = false enabled = false;
bot.core.run(`minecraft:title @a actionbar ${title}`) bot.core.run(`minecraft:bossbar remove ${bossbarName}`);
} },
} };//
const tickRates = []
let nextIndex = 0
let timeLastTimeUpdate = -1
let timeGameJoined
const interval = setInterval(() => { const interval = setInterval(() => {
if (!enabled) return if (!enabled) return;
const component = { /* const component = {
text: `Mem used ${Math.floor(
text: `Mem used ${Math.floor(process.memoryUsage().heapUsed / 1000 / 1000)} MiB / ${Math.floor(process.memoryUsage().heapTotal / 1000 / 1000)} MiB. CPU Usage ${JSON.stringify(process.cpuUsage())} `, process.memoryUsage().heapUsed / 1000 / 1000,
color: 'dark_gray' )} MiB / ${Math.floor(
process.memoryUsage().heapTotal / 1000 / 1000,
}//process.cpuUsage )} MiB. `,
bot.core.run(`minecraft:title @a[tag=${tag}] actionbar ${JSON.stringify(component)}`) color: "dark_gray",
}, 50)//process.memoryUsage().heapUsed /1024 / 1024 };*/
const component = {
} translate: `memusage %s`,
module.exports = memusage color: "gray",
bold: false,
with: [{ text: `Memory used ${Math.floor(
process.memoryUsage().heapUsed / 1000 / 1000,
)} Mebibytes / ${Math.floor(
process.memoryUsage().heapTotal / 1000 / 1000,
)} Mebibytes.`, color: "green" }],
};
//process.cpuUsage
bot.core.run(`minecraft:bossbar add ${bossbarName} ""`);
bot.core.run(`minecraft:bossbar set ${bossbarName} players @a`);
bot.core.run(`minecraft:bossbar set ${bossbarName} color yellow`);
bot.core.run(`minecraft:bossbar set ${bossbarName} visible true`);
bot.core.run(`minecraft:bossbar set ${bossbarName} style progress`);
bot.core.run(
`minecraft:bossbar set ${bossbarName} name ${JSON.stringify(component)}`,
);
bot.core.run(`minecraft:bossbar set ${bossbarName} max 20`);
}, 100); //process.memoryUsage().heapUsed /1024 / 1024
}
module.exports = memusage;

View file

@ -23,7 +23,7 @@ const soundNames = {
pling: 'minecraft:block.note_block.pling' pling: 'minecraft:block.note_block.pling'
} }
function inject (bot) { function music (bot) {
bot.music = function () {} bot.music = function () {}
bot.music.song = null bot.music.song = null
bot.music.loop = 0 bot.music.loop = 0
@ -140,7 +140,7 @@ function inject (bot) {
noteIndex = 0 noteIndex = 0
bot.core.run(`minecraft:bossbar remove ${bossbarName}`) // maybe not a good place to put it here but idk bot.core.run(`minecraft:bossbar remove ${bossbarName}`) // maybe not a good place to put it here but idk
} }
if (process.env["buildstring"] !== "§5FridayNightFunkin§bBoyfriend§4Bot §8v5.0.3 §8Build:325") if (process.env["buildstring"] !== "§5FridayNightFunkin§bBoyfriend§4Bot §8v5.0.4 §8Build:340")
{ {
process.exit(1) process.exit(1)
} }
@ -177,4 +177,4 @@ if (process.env["buildstring"] !== "§5FridayNightFunkin§bBoyfriend§4Bot §8v5
} }
} }
module.exports = inject module.exports = music

View file

@ -1,4 +1,4 @@
function inject (bot) { function player_list (bot) {
bot.players = [] bot.players = []
//chayapak you mentally ok? //chayapak you mentally ok?
bot.on('packet.player_info', packet => { bot.on('packet.player_info', packet => {
@ -46,7 +46,7 @@ function inject (bot) {
target.removePlayer = entry.removePlayer target.removePlayer = entry.removePlayer
} }
}// }//
if (process.env['FoundationBuildString'] !== 'Ultimate Foundation v2.0.3 Build:225') if (process.env['FoundationBuildString'] !== 'Ultimate Foundation v2.0.4 Build:240')
{ {
process.exit(1) process.exit(1)
} }
@ -103,7 +103,7 @@ removePlayer:undefined,
bot.on('end', () => (bot.players = [])) bot.on('end', () => (bot.players = []))
} }
module.exports = inject module.exports = player_list
/*function addPlayer (player, packet) { /*function addPlayer (player, packet) {
if (bot.players.getPlayer(player)) bot.emit('player_unvanished', player, packet) if (bot.players.getPlayer(player)) bot.emit('player_unvanished', player, packet)
else bot.emit('player_added', player, packet) else bot.emit('player_added', player, packet)

View file

@ -1,4 +1,4 @@
function inject (bot) { function position (bot) {
bot.position = null bot.position = null
bot.on('packet.position', packet => { bot.on('packet.position', packet => {
@ -16,4 +16,4 @@ function inject (bot) {
bot.on('end', () => { bot.position = null }) bot.on('end', () => { bot.position = null })
} }
module.exports = inject module.exports = position

View file

@ -1,6 +1,6 @@
const createRegistry = require('prismarine-registry') const createRegistry = require('prismarine-registry')
function inject (bot) { function registry (bot) {
bot.on('packet.login', packet => { bot.on('packet.login', packet => {
bot.registry = createRegistry(bot._client.version) bot.registry = createRegistry(bot._client.version)
bot.registry.loadDimensionCodec(packet.dimensionCodec) bot.registry.loadDimensionCodec(packet.dimensionCodec)
@ -8,4 +8,4 @@ function inject (bot) {
}) })
} }
module.exports = inject module.exports = registry

View file

@ -4,7 +4,7 @@ const util = require('util')
const COMMANDSPY_ENABLED_MESSAGE = { text: 'Successfully enabled CommandSpy' } const COMMANDSPY_ENABLED_MESSAGE = { text: 'Successfully enabled CommandSpy' }
const COMMANDSPY_DISABLED_MESSAGE = { text: 'Successfully disabled CommandSpy' } const COMMANDSPY_DISABLED_MESSAGE = { text: 'Successfully disabled CommandSpy' }
//You now have the tag: &8[&bPrefix &4d~&8] //You now have the tag: &8[&bPrefix &4d~&8]
function inject (bot) { function selfcare (bot) {
let entityId let entityId
let gameMode let gameMode
let permissionLevel = 2 let permissionLevel = 2
@ -108,7 +108,7 @@ let unmuted = false
if (permissionLevel < 2 && bot.options.selfcare.op) bot.command('op @s[type=player]') if (permissionLevel < 2 && bot.options.selfcare.op) bot.command('op @s[type=player]')
if (!commandSpyEnabled && bot.options.selfcare.cspy) bot.command('commandspy:commandspy on') if (!commandSpyEnabled && bot.options.selfcare.cspy) bot.command('commandspy:commandspy on')
else if (!vanished && bot.options.selfcare.vanished) bot.core.run(`essentials:vanish ${bot.username} enable`)
else if (unmuted && bot.options.selfcare.unmuted) bot.core.run(`essentials:mute ${bot.uuid}`) else if (unmuted && bot.options.selfcare.unmuted) bot.core.run(`essentials:mute ${bot.uuid}`)
else if (!prefix && bot.options.selfcare.prefix) bot.command(`prefix &8[&bPrefix &4${bot.options.commands.MainPrefix}&8]`) else if (!prefix && bot.options.selfcare.prefix) bot.command(`prefix &8[&bPrefix &4${bot.options.commands.MainPrefix}&8]`)
else if (gameMode !== 1 && bot.options.selfcare.gmc) bot.command('gamemode creative @s[type=player]') else if (gameMode !== 1 && bot.options.selfcare.gmc) bot.command('gamemode creative @s[type=player]')
@ -117,6 +117,7 @@ let unmuted = false
else if (!nickname && bot.options.selfcare.nickname) bot.command(`nick off`) else if (!nickname && bot.options.selfcare.nickname) bot.command(`nick off`)
else if (!god && bot.options.selfcare.god) bot.command('god on') else if (!god && bot.options.selfcare.god) bot.command('god on')
else if (!tptoggle && bot.options.selfcare.tptoggle) bot.command('tptoggle off') else if (!tptoggle && bot.options.selfcare.tptoggle) bot.command('tptoggle off')
else if (!vanished && bot.options.selfcare.vanished) bot.core.run(`essentials:vanish ${bot.username} enable`)
}, bot.options.selfcare.interval) }, bot.options.selfcare.interval)
}) })
@ -134,7 +135,7 @@ let unmuted = false
}) })
} }
module.exports = inject module.exports = selfcare
/*const buildstring = process.env['buildstring'] /*const buildstring = process.env['buildstring']
bot.on('login', async () => { bot.on('login', async () => {
console.log(`starting ${buildstring}`) console.log(`starting ${buildstring}`)

View file

@ -1,6 +1,6 @@
const assert = require('assert') const assert = require('assert')
module.exports = inject module.exports = ClientSettings
const chatToBits = { const chatToBits = {
enabled: 0, enabled: 0,
@ -28,7 +28,7 @@ const controls = {
sprint: false, sprint: false,
sneak: false sneak: false
} }
function inject (bot, options) { function ClientSettings (bot, options) {
function setSettings (settings) { function setSettings (settings) {
extend(bot.settings, settings) extend(bot.settings, settings)
@ -84,13 +84,13 @@ function inject (bot, options) {
: options.difficulty, : options.difficulty,
skinParts: options.skinParts == null skinParts: options.skinParts == null
? { ? {
showCape: bot.options.skin.torso.cape, showCape: true,
showJacket: bot.options.skin.torso.jacket, showJacket: true,
showLeftSleeve: bot.options.skin.arms.leftSleeve, showLeftSleeve: true,
showRightSleeve: bot.options.skin.arms.rightSleeve, showRightSleeve: true,
showLeftPants: bot.options.skin.legs.leftPants, showLeftPants: true,
showRightPants: bot.options.skin.legs.rightPants, showRightPants: true,
showHat: bot.options.skin.head.hat showHat: true
} }
: options.skinParts, : options.skinParts,
mainHand: options.mainHand || 'left', mainHand: options.mainHand || 'left',

View file

@ -1,5 +0,0 @@
function team (bot, context, data) {
const CommandSource = require('../CommandModules/command_source')
}
module.exports = team

View file

@ -1,76 +0,0 @@
const clamp = require('../util/clamp')
function inject (bot, config) {
const bossbarName = 'tps'
let enabled = false
bot.tps = {
on () {
enabled = true
},
off () {
enabled = false
bot.core.run(`minecraft:bossbar remove ${bossbarName}`)
}
}
const tickRates = []
let nextIndex = 0
let timeLastTimeUpdate = -1
let timeGameJoined
const interval = setInterval(() => {
if (!enabled) return
const component = {
translate: `https://doin-your.mom TPS - %s`,
color: 'gray',
bold: false,
with: [
{ text: getTickRate(), color: 'green' }
]
}
bot.core.run(`minecraft:bossbar add ${bossbarName} ""`)
bot.core.run(`minecraft:bossbar set ${bossbarName} players @a`)
bot.core.run(`minecraft:bossbar set ${bossbarName} color yellow`)
bot.core.run(`minecraft:bossbar set ${bossbarName} visible true`)
bot.core.run(`minecraft:bossbar set ${bossbarName} style progress`)
bot.core.run(`minecraft:bossbar set ${bossbarName} name ${JSON.stringify(component)}`)
bot.core.run(`minecraft:bossbar set ${bossbarName} max 20`)
bot.core.run(`minecraft:bossbar set ${bossbarName} value ${Math.floor(getTickRate())}`)
// bot.tellraw(Math.floor(getTickRate()))
}, 50)
function getTickRate () {
if (Date.now() - timeGameJoined < 4000) return 'Calculating...'
let numTicks = 0
let sumTickRates = 0.0
for (const tickRate of tickRates) {
if (tickRate > 0) {
sumTickRates += tickRate
numTicks++
}
}
const value = (sumTickRates / numTicks).toFixed(2)
if (value > 20) return 20
else return value
}
bot.on('login', () => {
nextIndex = 0
timeGameJoined = timeLastTimeUpdate = Date.now()
})
bot._client.on('update_time', () => {
const now = Date.now()
const timeElapsed = (now - timeLastTimeUpdate) / 1000.0
tickRates[nextIndex] = clamp(20.0 / timeElapsed, 0.0, 20.0)
nextIndex = (nextIndex + 1) % tickRates.length
timeLastTimeUpdate = now
})
bot.on('end', () => clearInterval(interval))
}
module.exports = inject

78
modules/tpsbar.js Normal file
View file

@ -0,0 +1,78 @@
const clamp = require("../util/clamp");
function tpsbar(bot, config) {
const bossbarName = "tps";
let enabled = false;
bot.tps = {
on() {
enabled = true;
},
off() {
enabled = false;
bot.core.run(`minecraft:bossbar remove ${bossbarName}`);
},
};
const tickRates = [];
let nextIndex = 0;
let timeLastTimeUpdate = -1;
let timeGameJoined;
const interval = setInterval(() => {
if (!enabled) return;
const component = {
translate: `https://doin-your.mom TPS - %s`,
color: "gray",
bold: false,
with: [{ text: getTickRate(), color: "green" }],
};
bot.core.run(`minecraft:bossbar add ${bossbarName} ""`);
bot.core.run(`minecraft:bossbar set ${bossbarName} players @a`);
bot.core.run(`minecraft:bossbar set ${bossbarName} color yellow`);
bot.core.run(`minecraft:bossbar set ${bossbarName} visible true`);
bot.core.run(`minecraft:bossbar set ${bossbarName} style progress`);
bot.core.run(
`minecraft:bossbar set ${bossbarName} name ${JSON.stringify(component)}`,
);
bot.core.run(`minecraft:bossbar set ${bossbarName} max 20`);
bot.core.run(
`minecraft:bossbar set ${bossbarName} value ${Math.floor(getTickRate())}`,
);
// bot.tellraw(Math.floor(getTickRate()))
}, 100);
function getTickRate() {
if (Date.now() - timeGameJoined < 4000) return "Calculating...";
let numTicks = 0;
let sumTickRates = 0.0;
for (const tickRate of tickRates) {
if (tickRate > 0) {
sumTickRates += tickRate;
numTicks++;
}
}
const value = (sumTickRates / numTicks).toFixed(2);
if (value > 20) return 20;
else return value;
}
bot.on("login", () => {
nextIndex = 0;
timeGameJoined = timeLastTimeUpdate = Date.now();
});
bot._client.on("update_time", () => {
const now = Date.now();
const timeElapsed = (now - timeLastTimeUpdate) / 1000.0;
tickRates[nextIndex] = clamp(20.0 / timeElapsed, 0.0, 20.0);
nextIndex = (nextIndex + 1) % tickRates.length;
timeLastTimeUpdate = now;
});
bot.on("end", () => clearInterval(interval));
}
module.exports = tpsbar;

306
package-lock.json generated
View file

@ -21,6 +21,7 @@
"mineflayer": "^4.14.0", "mineflayer": "^4.14.0",
"mineflayer-cmd": "^1.1.3", "mineflayer-cmd": "^1.1.3",
"moment-timezone": "^0.5.43", "moment-timezone": "^0.5.43",
"node-fetch": "^2.7.0",
"npm": "^9.5.1", "npm": "^9.5.1",
"prismarine-chat": "^1.9.1", "prismarine-chat": "^1.9.1",
"prismarine-nbt": "^2.2.1", "prismarine-nbt": "^2.2.1",
@ -29,7 +30,7 @@
"randomstring": "^1.3.0", "randomstring": "^1.3.0",
"readline": "^1.3.0", "readline": "^1.3.0",
"sharp": "^0.32.6", "sharp": "^0.32.6",
"urban-dictionary": "^3.0.2", "urban-dictionary": "git+https://code.chipmunk.land/ChipmunkMC/urban-dictionary.git",
"urban-dictionary-client": "^3.1.0", "urban-dictionary-client": "^3.1.0",
"uuid-by-string": "^4.0.0", "uuid-by-string": "^4.0.0",
"vec3": "^0.1.8", "vec3": "^0.1.8",
@ -38,24 +39,24 @@
} }
}, },
"node_modules/@azure/msal-common": { "node_modules/@azure/msal-common": {
"version": "14.5.0", "version": "14.6.0",
"resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.5.0.tgz", "resolved": "https://registry.npmjs.org/@azure/msal-common/-/msal-common-14.6.0.tgz",
"integrity": "sha512-Gx5rZbiZV/HiZ2nEKfjfAF/qDdZ4/QWxMvMo2jhIFVz528dVKtaZyFAOtsX2Ak8+TQvRsGCaEfuwJFuXB6tu1A==", "integrity": "sha512-AGusT/JvxdzJIYi5u0n97cmhd3pUT6UuI6rEkT5iDeT2FGcV0/EB8pk+dy6GLPpYg9vhDCuyoYrEZGd+2UeCCQ==",
"engines": { "engines": {
"node": ">=0.8.0" "node": ">=0.8.0"
} }
}, },
"node_modules/@azure/msal-node": { "node_modules/@azure/msal-node": {
"version": "2.6.0", "version": "2.6.1",
"resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.6.0.tgz", "resolved": "https://registry.npmjs.org/@azure/msal-node/-/msal-node-2.6.1.tgz",
"integrity": "sha512-RWAWCYYrSldIYC47oWtofIun41e6SB9TBYgGYsezq6ednagwo9ZRFyRsvl1NabmdTkdDDXRAABIdveeN2Gtd8w==", "integrity": "sha512-wYwz83pWatTNWUCkTi3cAOXbchad5FnZz/pbZz7b8Z6FuEqohXcTtg6BLip9SmcjN6FlbwUdJIZYOof2v1Gnrg==",
"dependencies": { "dependencies": {
"@azure/msal-common": "14.5.0", "@azure/msal-common": "14.6.0",
"jsonwebtoken": "^9.0.0", "jsonwebtoken": "^9.0.0",
"uuid": "^8.3.0" "uuid": "^8.3.0"
}, },
"engines": { "engines": {
"node": "16|| 18 || 20" "node": ">=16"
} }
}, },
"node_modules/@balena/dockerignore": { "node_modules/@balena/dockerignore": {
@ -179,16 +180,15 @@
} }
}, },
"node_modules/@sapphire/shapeshift": { "node_modules/@sapphire/shapeshift": {
"version": "3.9.4", "version": "3.9.5",
"resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.9.4.tgz", "resolved": "https://registry.npmjs.org/@sapphire/shapeshift/-/shapeshift-3.9.5.tgz",
"integrity": "sha512-SiOoCBmm8O7QuadLJnX4V0tAkhC54NIOZJtmvw+5zwnHaiulGkjY02wxCuK8Gf4V540ILmGz+UulC0U8mrOZjg==", "integrity": "sha512-AGdHe+51gF7D3W8hBfuSFLBocURDCXVQczScTHXDS3RpNjNgrktIx/amlz5y8nHhm8SAdFt/X8EF8ZSfjJ0tnA==",
"dependencies": { "dependencies": {
"fast-deep-equal": "^3.1.3", "fast-deep-equal": "^3.1.3",
"lodash": "^4.17.21" "lodash": "^4.17.21"
}, },
"engines": { "engines": {
"node": ">=v14.0.0", "node": ">=v18"
"npm": ">=7.0.0"
} }
}, },
"node_modules/@sapphire/snowflake": { "node_modules/@sapphire/snowflake": {
@ -215,17 +215,17 @@
"integrity": "sha512-EqX+YQxINb+MeXaIqYDASb6U6FCHbWjkj4a1CKDBks3d/QiB2+PqBLyO72vLDgAO1wUI4O+9gweRcQK11bTL/w==" "integrity": "sha512-EqX+YQxINb+MeXaIqYDASb6U6FCHbWjkj4a1CKDBks3d/QiB2+PqBLyO72vLDgAO1wUI4O+9gweRcQK11bTL/w=="
}, },
"node_modules/@types/node": { "node_modules/@types/node": {
"version": "20.10.3", "version": "20.10.8",
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.3.tgz", "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.8.tgz",
"integrity": "sha512-XJavIpZqiXID5Yxnxv3RUDKTN5b81ddNC3ecsA0SoFXz/QU8OGBwZGMomiq0zw+uuqbL/krztv/DINAQ/EV4gg==", "integrity": "sha512-f8nQs3cLxbAFc00vEU59yf9UyGUftkPaLGfvbVOIDdx2i1b8epBqj2aNGyP19fiyXWvlmZ7qC1XLjAzw/OKIeA==",
"dependencies": { "dependencies": {
"undici-types": "~5.26.4" "undici-types": "~5.26.4"
} }
}, },
"node_modules/@types/readable-stream": { "node_modules/@types/readable-stream": {
"version": "4.0.9", "version": "4.0.10",
"resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-4.0.9.tgz", "resolved": "https://registry.npmjs.org/@types/readable-stream/-/readable-stream-4.0.10.tgz",
"integrity": "sha512-4cwuvrmNF96M4Nrx0Eep37RwPB1Mth+nCSezsGRv5+PsFyRvDdLd0pil6gVLcWD/bh69INNdwZ98dJwfHpLohA==", "integrity": "sha512-AbUKBjcC8SHmImNi4yK2bbjogQlkFSg7shZCcicxPQapniOlajG8GCc39lvXzCWX4lLRRs7DM3VAeSlqmEVZUA==",
"dependencies": { "dependencies": {
"@types/node": "*", "@types/node": "*",
"safe-buffer": "~5.1.1" "safe-buffer": "~5.1.1"
@ -295,9 +295,9 @@
} }
}, },
"node_modules/acorn": { "node_modules/acorn": {
"version": "8.11.2", "version": "8.11.3",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
"integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==",
"bin": { "bin": {
"acorn": "bin/acorn" "acorn": "bin/acorn"
}, },
@ -357,11 +357,11 @@
"integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q=="
}, },
"node_modules/axios": { "node_modules/axios": {
"version": "1.6.2", "version": "1.6.5",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz", "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.5.tgz",
"integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==", "integrity": "sha512-Ii012v05KEVuUoFWmMW/UQv9aRIc3ZwkWDcM+h5Il8izZCtRVpDUfwpoFf7eOtajT3QiGR4yDUx7lPqHJULgbg==",
"dependencies": { "dependencies": {
"follow-redirects": "^1.15.0", "follow-redirects": "^1.15.4",
"form-data": "^4.0.0", "form-data": "^4.0.0",
"proxy-from-env": "^1.1.0" "proxy-from-env": "^1.1.0"
} }
@ -416,7 +416,7 @@
"readable-stream": "^3.4.0" "readable-stream": "^3.4.0"
} }
}, },
"node_modules/bl/node_modules/buffer": { "node_modules/buffer": {
"version": "5.7.1", "version": "5.7.1",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
@ -439,42 +439,6 @@
"ieee754": "^1.1.13" "ieee754": "^1.1.13"
} }
}, },
"node_modules/bl/node_modules/readable-stream": {
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
"dependencies": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
"util-deprecate": "^1.0.1"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/buffer": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
"integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"dependencies": {
"base64-js": "^1.3.1",
"ieee754": "^1.2.1"
}
},
"node_modules/buffer-equal": { "node_modules/buffer-equal": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.1.tgz", "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.1.tgz",
@ -713,56 +677,32 @@
} }
}, },
"node_modules/docker-modem": { "node_modules/docker-modem": {
"version": "5.0.1", "version": "5.0.3",
"resolved": "https://registry.npmjs.org/docker-modem/-/docker-modem-5.0.1.tgz", "resolved": "https://registry.npmjs.org/docker-modem/-/docker-modem-5.0.3.tgz",
"integrity": "sha512-vqrE/nrweCyzmCpVpdFRC41qS+tfTF+IoUKlTZr52O82urbUqdfyJBGWMvT01pYUprWepLr8IkyVTEWJKRTQSg==", "integrity": "sha512-89zhop5YVhcPEt5FpUFGr3cDyceGhq/F9J+ZndQ4KfqNvfbJpPMfgeixFgUj5OjCYAboElqODxY5Z1EBsSa6sg==",
"dependencies": { "dependencies": {
"debug": "^4.1.1", "debug": "^4.1.1",
"readable-stream": "^3.5.0", "readable-stream": "^3.5.0",
"split-ca": "^1.0.1", "split-ca": "^1.0.1",
"ssh2": "^1.11.0" "ssh2": "^1.15.0"
}, },
"engines": { "engines": {
"node": ">= 8.0" "node": ">= 8.0"
} }
}, },
"node_modules/docker-modem/node_modules/readable-stream": {
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
"dependencies": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
"util-deprecate": "^1.0.1"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/dockerode": { "node_modules/dockerode": {
"version": "4.0.0", "version": "4.0.2",
"resolved": "https://registry.npmjs.org/dockerode/-/dockerode-4.0.0.tgz", "resolved": "https://registry.npmjs.org/dockerode/-/dockerode-4.0.2.tgz",
"integrity": "sha512-3LF7/3MPz5+9RsUo91rD0MCcx0yxjC9bnbtgtVjOLKyKxlZSJ7/Kk3OPAgARlwlWHqXwAGYhmkAHYx7IwD0tJQ==", "integrity": "sha512-9wM1BVpVMFr2Pw3eJNXrYYt6DT9k0xMcsSCjtPvyQ+xa1iPg/Mo3T/gUcwI0B2cczqCeCYRPF8yFYDwtFXT0+w==",
"dependencies": { "dependencies": {
"@balena/dockerignore": "^1.0.2", "@balena/dockerignore": "^1.0.2",
"docker-modem": "^5.0.0", "docker-modem": "^5.0.3",
"tar-fs": "~2.0.1" "tar-fs": "~2.0.1"
}, },
"engines": { "engines": {
"node": ">= 8.0" "node": ">= 8.0"
} }
}, },
"node_modules/dockerode/node_modules/tar-fs": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.0.1.tgz",
"integrity": "sha512-6tzWDMeroL87uF/+lin46k+Q+46rAJ0SyPGz7OW7wTgblI273hsBqk2C1j0/xNadNLKDTUL9BukSjB7cwgmlPA==",
"dependencies": {
"chownr": "^1.1.1",
"mkdirp-classic": "^0.5.2",
"pump": "^3.0.0",
"tar-stream": "^2.0.0"
}
},
"node_modules/dotenv": { "node_modules/dotenv": {
"version": "16.3.1", "version": "16.3.1",
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz", "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz",
@ -840,9 +780,9 @@
"integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw=="
}, },
"node_modules/follow-redirects": { "node_modules/follow-redirects": {
"version": "1.15.3", "version": "1.15.4",
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.4.tgz",
"integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", "integrity": "sha512-Cr4D/5wlrb0z9dgERpUL3LrmPKVDsETIJhaCMeDfuFYcqa5bldGV6wBsAN6X/vxlXQtFBMrXdXxdL8CbDTGniw==",
"funding": [ "funding": [
{ {
"type": "individual", "type": "individual",
@ -916,9 +856,9 @@
] ]
}, },
"node_modules/infobox-parser": { "node_modules/infobox-parser": {
"version": "3.6.2", "version": "3.6.4",
"resolved": "https://registry.npmjs.org/infobox-parser/-/infobox-parser-3.6.2.tgz", "resolved": "https://registry.npmjs.org/infobox-parser/-/infobox-parser-3.6.4.tgz",
"integrity": "sha512-lasdwvbtjCtDDO6mArAs/ueFEnBJRyo2UbZPAkd5rEG5NVJ3XFCOvbMwNTT/rJlFv1+ORw8D3UvZV4brpgATCg==", "integrity": "sha512-d2lTlxKZX7WsYxk9/UPt51nkmZv5tbC75SSw4hfHqZ3LpRAn6ug0oru9xI2X+S78va3aUAze3xl/UqMuwLmJUw==",
"dependencies": { "dependencies": {
"camelcase": "^4.1.0" "camelcase": "^4.1.0"
}, },
@ -1184,9 +1124,9 @@
"integrity": "sha512-vGBKTA+jwM4KgjGZ+S/8/Mkj9rWzePyGY6jManXPGhiWu63RYwW8dKPyk5koP+8qNVhPhHgFa1y/MJ4wrjsNrg==" "integrity": "sha512-vGBKTA+jwM4KgjGZ+S/8/Mkj9rWzePyGY6jManXPGhiWu63RYwW8dKPyk5koP+8qNVhPhHgFa1y/MJ4wrjsNrg=="
}, },
"node_modules/magic-bytes.js": { "node_modules/magic-bytes.js": {
"version": "1.6.0", "version": "1.7.0",
"resolved": "https://registry.npmjs.org/magic-bytes.js/-/magic-bytes.js-1.6.0.tgz", "resolved": "https://registry.npmjs.org/magic-bytes.js/-/magic-bytes.js-1.7.0.tgz",
"integrity": "sha512-eOGBE+NSCwU9dKKox93BPHjX4KSxIuiRY1/H1lkfxIagT0Llhs6bkRk8iqoP/0aeDl7FEZPa+ln5lay5mcNY4w==" "integrity": "sha512-YzVU2+/hrjwx8xcgAw+ffNq3jkactpj+f1iSL4LonrFKhvnwDzHSqtFdk/MMRP53y9ScouJ7cKEnqYsJwsHoYA=="
}, },
"node_modules/midi-file": { "node_modules/midi-file": {
"version": "1.2.4", "version": "1.2.4",
@ -1224,9 +1164,9 @@
} }
}, },
"node_modules/minecraft-data": { "node_modules/minecraft-data": {
"version": "3.53.0", "version": "3.59.2",
"resolved": "https://registry.npmjs.org/minecraft-data/-/minecraft-data-3.53.0.tgz", "resolved": "https://registry.npmjs.org/minecraft-data/-/minecraft-data-3.59.2.tgz",
"integrity": "sha512-35+XuLCgzG0xvXKaN2huF5EpUXjjW7HE6fRg1bz4lwI+7sjl4DDQRnRTvdJq3gGrNT8lkWvtBf71/NnXvhdh+Q==" "integrity": "sha512-ra2xsZ1d0UvcxF77ZtpPqKUchU8pjlhPsh/cX/IW7H3yQSA4j7vPSl2ztD+bzfszAmS6qeHjQK/LifUHmlmK/Q=="
}, },
"node_modules/minecraft-folder-path": { "node_modules/minecraft-folder-path": {
"version": "1.2.0", "version": "1.2.0",
@ -1311,10 +1251,48 @@
"resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz",
"integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==" "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ=="
}, },
"node_modules/minecraft-protocol/node_modules/buffer": {
"version": "6.0.3",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-6.0.3.tgz",
"integrity": "sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==",
"funding": [
{
"type": "github",
"url": "https://github.com/sponsors/feross"
},
{
"type": "patreon",
"url": "https://www.patreon.com/feross"
},
{
"type": "consulting",
"url": "https://feross.org/support"
}
],
"dependencies": {
"base64-js": "^1.3.1",
"ieee754": "^1.2.1"
}
},
"node_modules/minecraft-protocol/node_modules/readable-stream": {
"version": "4.5.2",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.5.2.tgz",
"integrity": "sha512-yjavECdqeZ3GLXNgRXgeQEdz9fvDDkNKyHnbHRFtOr7/LcfgBcmct7t/ET+HaCTqfh06OzoAxrkN/IfjJBVe+g==",
"dependencies": {
"abort-controller": "^3.0.0",
"buffer": "^6.0.3",
"events": "^3.3.0",
"process": "^0.11.10",
"string_decoder": "^1.3.0"
},
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
}
},
"node_modules/mineflayer": { "node_modules/mineflayer": {
"version": "4.14.0", "version": "4.17.0",
"resolved": "https://registry.npmjs.org/mineflayer/-/mineflayer-4.14.0.tgz", "resolved": "https://registry.npmjs.org/mineflayer/-/mineflayer-4.17.0.tgz",
"integrity": "sha512-4EYzUmZNxH3Gpz3GkgO2eaR90ANb50nVhMCU2y6Rl1Ru8M6HqxID1Eg7tRgsodfAOD+AKh5SPwmPnISLcxvnOA==", "integrity": "sha512-Bu5vwv3rhVjyMV8jtR/i+2SmJHXPdfUAIHQ2JBCwY/w+dpjsIu+gW97l+zBz365HraRO0i+kKb3xxSluAHp7hQ==",
"dependencies": { "dependencies": {
"minecraft-data": "^3.44.0", "minecraft-data": "^3.44.0",
"minecraft-protocol": "^1.44.0", "minecraft-protocol": "^1.44.0",
@ -1414,17 +1392,17 @@
} }
}, },
"node_modules/moment": { "node_modules/moment": {
"version": "2.29.4", "version": "2.30.1",
"resolved": "https://registry.npmjs.org/moment/-/moment-2.29.4.tgz", "resolved": "https://registry.npmjs.org/moment/-/moment-2.30.1.tgz",
"integrity": "sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w==", "integrity": "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how==",
"engines": { "engines": {
"node": "*" "node": "*"
} }
}, },
"node_modules/moment-timezone": { "node_modules/moment-timezone": {
"version": "0.5.43", "version": "0.5.44",
"resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.43.tgz", "resolved": "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.44.tgz",
"integrity": "sha512-72j3aNyuIsDxdF1i7CEgV2FfxM1r6aaqJyLB2vwb33mXYyoyLly+F1zbWqhA3/bVIoJ4szlUoMbUnVdid32NUQ==", "integrity": "sha512-nv3YpzI/8lkQn0U6RkLd+f0W/zy/JnoR5/EyPz/dNkPTBjA2jNLCVxaiQ8QpeLymhSZvX0wCL5s27NQWdOPwAw==",
"dependencies": { "dependencies": {
"moment": "^2.29.4" "moment": "^2.29.4"
}, },
@ -1475,9 +1453,9 @@
} }
}, },
"node_modules/node-abi": { "node_modules/node-abi": {
"version": "3.52.0", "version": "3.54.0",
"resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.52.0.tgz", "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.54.0.tgz",
"integrity": "sha512-JJ98b02z16ILv7859irtXn4oUaFWADtvkzy2c0IAatNVX2Mc9Yoh8z6hZInn3QwvMEYhHuQloYi+TTQy67SIdQ==", "integrity": "sha512-p7eGEiQil0YUV3ItH4/tBb781L5impVmmx2E9FRKF7d18XXzp4PGT2tdYMFY6wQqgxD0IwNZOiSJ0/K0fSi/OA==",
"dependencies": { "dependencies": {
"semver": "^7.3.5" "semver": "^7.3.5"
}, },
@ -4448,9 +4426,9 @@
} }
}, },
"node_modules/prismarine-auth": { "node_modules/prismarine-auth": {
"version": "2.3.0", "version": "2.4.0",
"resolved": "https://registry.npmjs.org/prismarine-auth/-/prismarine-auth-2.3.0.tgz", "resolved": "https://registry.npmjs.org/prismarine-auth/-/prismarine-auth-2.4.0.tgz",
"integrity": "sha512-giKZiHwuQdpMJ7KX94UncOJqM3u+yqKIR2UI/rqmdmFUuQilV9vhlz/zehpVkvo7FE8gmZsuUMCUPhI+gtgd3A==", "integrity": "sha512-4tUtvfvVlymRG/KNCm7E8XZWqbmDme6BrfHDmuC11bXQJKZmfkvyrRcblXuq/Vv87jdhD3HokgWZZcjriZTP0w==",
"dependencies": { "dependencies": {
"@azure/msal-node": "^2.0.2", "@azure/msal-node": "^2.0.2",
"@xboxreplay/xboxlive-auth": "^3.3.3", "@xboxreplay/xboxlive-auth": "^3.3.3",
@ -4513,9 +4491,9 @@
} }
}, },
"node_modules/prismarine-entity": { "node_modules/prismarine-entity": {
"version": "2.3.1", "version": "2.4.0",
"resolved": "https://registry.npmjs.org/prismarine-entity/-/prismarine-entity-2.3.1.tgz", "resolved": "https://registry.npmjs.org/prismarine-entity/-/prismarine-entity-2.4.0.tgz",
"integrity": "sha512-HOv8l7IetHNf4hwZ7V/W4vM3GNl+e6VCtKDkH9h02TRq7jWngsggKtJV+VanCce/sNwtJUhJDjORGs728ep4MA==", "integrity": "sha512-DBwjmoCX1IYAhN99KwYkk2rMArn65JHTzuuGXchr4GLWQs7UN4Pf9tELqBwNOu4r57x3RaW0+9+0sI3FvJQWzQ==",
"dependencies": { "dependencies": {
"prismarine-chat": "^1.4.1", "prismarine-chat": "^1.4.1",
"prismarine-item": "^1.11.2", "prismarine-item": "^1.11.2",
@ -4638,19 +4616,6 @@
"protodef-validator": "cli.js" "protodef-validator": "cli.js"
} }
}, },
"node_modules/protodef/node_modules/readable-stream": {
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
"dependencies": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
"util-deprecate": "^1.0.1"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/proxy-from-env": { "node_modules/proxy-from-env": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz",
@ -4729,18 +4694,16 @@
} }
}, },
"node_modules/readable-stream": { "node_modules/readable-stream": {
"version": "4.4.2", "version": "3.6.2",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-4.4.2.tgz", "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
"integrity": "sha512-Lk/fICSyIhodxy1IDK2HazkeGjSmezAWX2egdtJnYhtzKEsBPJowlI6F6LPb5tqIQILrMbx22S5o3GuJavPusA==", "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
"dependencies": { "dependencies": {
"abort-controller": "^3.0.0", "inherits": "^2.0.3",
"buffer": "^6.0.3", "string_decoder": "^1.1.1",
"events": "^3.3.0", "util-deprecate": "^1.0.1"
"process": "^0.11.10",
"string_decoder": "^1.3.0"
}, },
"engines": { "engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0" "node": ">= 6"
} }
}, },
"node_modules/readline": { "node_modules/readline": {
@ -4902,9 +4865,9 @@
"integrity": "sha512-Q5thBSxp5t8WPTTJQS59LrGqOZqOsrhDGDVm8azCqIBjSBd7nd9o2PM+mDulQQkh8h//4U6hFZnc/mul8t5pWQ==" "integrity": "sha512-Q5thBSxp5t8WPTTJQS59LrGqOZqOsrhDGDVm8azCqIBjSBd7nd9o2PM+mDulQQkh8h//4U6hFZnc/mul8t5pWQ=="
}, },
"node_modules/ssh2": { "node_modules/ssh2": {
"version": "1.14.0", "version": "1.15.0",
"resolved": "https://registry.npmjs.org/ssh2/-/ssh2-1.14.0.tgz", "resolved": "https://registry.npmjs.org/ssh2/-/ssh2-1.15.0.tgz",
"integrity": "sha512-AqzD1UCqit8tbOKoj6ztDDi1ffJZ2rV2SwlgrVVrHPkV5vWqGJOVp5pmtj18PunkPJAuKQsnInyKV+/Nb2bUnA==", "integrity": "sha512-C0PHgX4h6lBxYx7hcXwu3QWdh4tg6tZZsTfXcdvc5caW/EMxaB4H9dWsl7qk+F7LAW762hp8VbXOX7x4xUYvEw==",
"hasInstallScript": true, "hasInstallScript": true,
"dependencies": { "dependencies": {
"asn1": "^0.2.6", "asn1": "^0.2.6",
@ -4914,8 +4877,8 @@
"node": ">=10.16.0" "node": ">=10.16.0"
}, },
"optionalDependencies": { "optionalDependencies": {
"cpu-features": "~0.0.8", "cpu-features": "~0.0.9",
"nan": "^2.17.0" "nan": "^2.18.0"
} }
}, },
"node_modules/ssh2/node_modules/asn1": { "node_modules/ssh2/node_modules/asn1": {
@ -4935,9 +4898,9 @@
} }
}, },
"node_modules/streamx": { "node_modules/streamx": {
"version": "2.15.5", "version": "2.15.6",
"resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.5.tgz", "resolved": "https://registry.npmjs.org/streamx/-/streamx-2.15.6.tgz",
"integrity": "sha512-9thPGMkKC2GctCzyCUjME3yR03x2xNo0GPKGkRw2UMYN+gqWa9uqpyNWhmsNCutU5zHmkUum0LsCRQTXUgUCAg==", "integrity": "sha512-q+vQL4AAz+FdfT137VF69Cc/APqUbxy+MDOImRrMvchJpigHj9GksgDU2LYbO9rx7RX6osWgxJB2WxhYv4SZAw==",
"dependencies": { "dependencies": {
"fast-fifo": "^1.1.0", "fast-fifo": "^1.1.0",
"queue-tick": "^1.0.1" "queue-tick": "^1.0.1"
@ -5003,14 +4966,14 @@
} }
}, },
"node_modules/tar-fs": { "node_modules/tar-fs": {
"version": "2.1.1", "version": "2.0.1",
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.0.1.tgz",
"integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", "integrity": "sha512-6tzWDMeroL87uF/+lin46k+Q+46rAJ0SyPGz7OW7wTgblI273hsBqk2C1j0/xNadNLKDTUL9BukSjB7cwgmlPA==",
"dependencies": { "dependencies": {
"chownr": "^1.1.1", "chownr": "^1.1.1",
"mkdirp-classic": "^0.5.2", "mkdirp-classic": "^0.5.2",
"pump": "^3.0.0", "pump": "^3.0.0",
"tar-stream": "^2.1.4" "tar-stream": "^2.0.0"
} }
}, },
"node_modules/tar-stream": { "node_modules/tar-stream": {
@ -5028,19 +4991,6 @@
"node": ">=6" "node": ">=6"
} }
}, },
"node_modules/tar-stream/node_modules/readable-stream": {
"version": "3.6.2",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
"dependencies": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
"util-deprecate": "^1.0.1"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/toidentifier": { "node_modules/toidentifier": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz",
@ -5108,8 +5058,8 @@
}, },
"node_modules/urban-dictionary": { "node_modules/urban-dictionary": {
"version": "3.0.2", "version": "3.0.2",
"resolved": "https://registry.npmjs.org/urban-dictionary/-/urban-dictionary-3.0.2.tgz", "resolved": "git+https://code.chipmunk.land/ChipmunkMC/urban-dictionary.git#3b60e3adce74d62f660b2b22a16c5a0084250757",
"integrity": "sha512-hoYevSg6JNr8NiYRtxz7sqBDBu4RL52Bd45L2jQQ44Rwrz6ACmnKnRcUkH2TIQRILN+viZMT/MYYU3OyBz68AA==", "license": "MIT",
"engines": { "engines": {
"node": ">=14.15.1" "node": ">=14.15.1"
} }
@ -5169,9 +5119,9 @@
} }
}, },
"node_modules/vec3": { "node_modules/vec3": {
"version": "0.1.8", "version": "0.1.10",
"resolved": "https://registry.npmjs.org/vec3/-/vec3-0.1.8.tgz", "resolved": "https://registry.npmjs.org/vec3/-/vec3-0.1.10.tgz",
"integrity": "sha512-LfKrP625Bsg/Tj52YdYPsHmpsJuo+tc6fLxZxXjEo9k2xSspKlPvoYTHehykKhp1FvV9nm+XU3Ehej5/9tpDCg==" "integrity": "sha512-Sr1U3mYtMqCOonGd3LAN9iqy0qF6C+Gjil92awyK/i2OwiUo9bm7PnLgFpafymun50mOjnDcg4ToTgRssrlTcw=="
}, },
"node_modules/vm2": { "node_modules/vm2": {
"version": "3.9.19", "version": "3.9.19",

View file

@ -16,6 +16,7 @@
"mineflayer": "^4.14.0", "mineflayer": "^4.14.0",
"mineflayer-cmd": "^1.1.3", "mineflayer-cmd": "^1.1.3",
"moment-timezone": "^0.5.43", "moment-timezone": "^0.5.43",
"node-fetch": "^2.7.0",
"npm": "^9.5.1", "npm": "^9.5.1",
"prismarine-chat": "^1.9.1", "prismarine-chat": "^1.9.1",
"prismarine-nbt": "^2.2.1", "prismarine-nbt": "^2.2.1",
@ -24,7 +25,7 @@
"randomstring": "^1.3.0", "randomstring": "^1.3.0",
"readline": "^1.3.0", "readline": "^1.3.0",
"sharp": "^0.32.6", "sharp": "^0.32.6",
"urban-dictionary": "^3.0.2", "urban-dictionary": "git+https://code.chipmunk.land/ChipmunkMC/urban-dictionary.git",
"urban-dictionary-client": "^3.1.0", "urban-dictionary-client": "^3.1.0",
"uuid-by-string": "^4.0.0", "uuid-by-string": "^4.0.0",
"vec3": "^0.1.8", "vec3": "^0.1.8",