Compare commits

..
4 Commits
Author SHA1 Message Date
Parker Griffith bb182ce430 Update src/modules/discord.js 2024-06-06 12:42:49 -04:00
Parker Griffith dc34bfb88f patches 2024-06-06 12:41:55 -04:00
Parker2991 6c52e1ec6d v5.0.8 2024-06-04 11:11:37 -04:00
Parker2991 43be2bf86a v5.0.8 2024-05-24 10:07:53 -04:00
204 changed files with 41657 additions and 5724 deletions
+12
View File
@@ -0,0 +1,12 @@
node_modules
logs
midis
config.yml
.env
amog
src/commands/kick.js
src/modules/exploits.js
src/commands/kick.js
prototyping-crap/java/build/
prototying-crap/java/.gradle/
.git
-17
View File
@@ -1,17 +0,0 @@
class CommandSource {
constructor (player, sources, hash, owner = false, discordMessageEvent = null) {
this.player = player
this.sources = sources
this.hash = hash
this.owner = owner
this.discordMessageEvent = discordMessageEvent
}
sendFeedback () {}
sendError (message) {
this.sendFeedback([{ text: '', color: 'dark_red' }, message], false)
}
}
module.exports = CommandSource
+12 -1
View File
@@ -1 +1,12 @@
this is a lost version of FNFBoyfriendBot found
exploits module was gitignored to prevent exploit leaks so the bot will not being able to run some commands without it
please make a file called exploits.js in modules and add this
```js
function exploits (bot, options, context) {
bot.exploits = {
hoe: ''
}
}
module.exports = exploits;
```
also src/commands/kick.js was gitignored so exploits wont be leaked
v5.0.8 is not done yet!
-70
View File
@@ -1,70 +0,0 @@
const mc = require('minecraft-protocol')
const { EventEmitter } = require('events')
const fs = require('fs')
const path = require('path')
// "buildstring":"FNFBoyfriendBotX V4.0.8a Build:97",
//"FoundationBuildString":"Ultimate Foundation V1.0.1 Build:31",
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 ??= username()
options.hideErrors ??= false // HACK: Hide errors by default as a lazy fix to console being spammed with them
bot.options = options
// Create our client object, put it on the bot, and register some events
bot.on('init_client', client => {
client.on('packet', (data, meta) => {
bot.emit('packet', data, meta)
bot.emit('packet.' + meta.name, data)
})
client.on('login', () => {
bot.uuid = client.uuid
bot.username = client.username
})
client.on('end', reason => bot.emit('end', reason))
client.on('error', error => bot.emit('error', error))
})
const buildstring = process.env['buildstring']
const client = options.client ?? mc.createClient(options)
bot._client = client
bot.emit('init_client', client)
bot.bots = options.bots ?? [bot]
// Modules
bot.loadModule = module => module(bot, options)
for (const filename of fs.readdirSync(path.join(__dirname, 'modules'))) {
try {
const module = require(path.join(__dirname, 'modules', filename))
bot.loadModule(module)
} catch (error) {
console.error('Failed to load module', filename, ':', error)
}
}
return bot
}
// ABot username function mabe mabe
function username() {
const characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'; // remove sus characters like ` or like ( or whatever because it breaks whatever
let username = '';
for (let i = 0; i < 8; i++) {
const randomIndex = Math.floor(Math.random() * characters.length);
username += characters[randomIndex];
}
return username;
}
module.exports = createBot
-57
View File
@@ -1,57 +0,0 @@
const crypto = require('crypto')
module.exports = {
name: 'abotval',
consoleOnly: true,
execute (context) {
const bot = context.bot
const prefix = '<' // mabe not hardcode the prefix
const args = context.arguments
let hashlol
const key = process.env['abot_key']
const date = new Date();
const min = date.getMinutes();
const md5 = crypto.createHash('md5').update(`${min}--_${key}`).digest('hex');
const basehash = crypto.createHash('sha256').update(md5).digest('hex');
const hashe = btoa(basehash)
const fullhash = crypto.createHash('sha256').update(hashe).digest('hex');
hashlol = fullhash.substring(0, 16);
//already have to token ready
const hash = hashlol
const command = `${prefix}${args.shift()} ${hash} ${args.join(' ')}`
const peefix = {
clickEvent: { action:"open_url", value: "https://doin-your.mom"},
"color": "#5A5A5A",
"translate": '[%s] %s \u203a %s',
"with": [
{ "color": "aqua", "text": "FNFBoyfriendBotX"},
{ "color": "aqua", "text": `${bot.username}`},
{ "color": "white", "text": command},
]// why name it that?? xD
}
context.bot.tellraw([peefix])
}//this isnt how..
}//./commands/tellraw.js
// Done!
//are ya able to help with the validation/hashing in mine?
// Make a copy of this
//ahh ok
//whos not
// Can cars fly?
//fr
// look at the console
// watch console rq
// Rip our ram lmao
-12
View File
@@ -1,12 +0,0 @@
const CommandError = require('../CommandModules/command_error')
module.exports = {
name: 'botdevhistory',
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!')
}
}
-191
View File
@@ -1,191 +0,0 @@
// TODO: Maybe add more authors
const bots = [
{
name: { text: 'HBot', color: 'aqua', bold:true },
authors: ['hhhzzzsss'],
exclaimer:'HBOT HARRYBUTT LMAOOOOOOOOOOOOOOOOO',
foundation: 'java/mcprotocollib',
prefixes: ['#']
},
{
name: [{ text: 'Evil', color: 'dark_red' }, {text:'Bot', color:'dark_purple'}],
authors: ['FusseligerDev'],
exclaimer:'',
foundation: 'Java/Custom',
prefixes: ['!']
},
{
name: { text: 'SBot Java', color: 'white', bold:true }, // TODO: Gradient
authors: ['evkc'],
foundation: 'Java/MCProtocolLib',
prefixes: [':']
},
{
name: { text: 'SBot Rust', color: 'white', bold:true }, // TODO: Gradient
authors: ['evkc'],
foundation: 'Rust',
prefixes: ['re:']
},
{
name: { text: 'Z-Boy-Bot', color: 'dark_purple' }, // 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: '',
authors: ['yfd'],
foundation: 'NodeJS/Node-Minecraft-Protocol',
prefixes: ['<']
},
{
name: { text: 'FardBot', color: 'light_purple' },
authors: ['_yfd'],
exclaimer: 'bot is dead lol',
foundation: 'NodeJS/Mineflayer',
prefixes: ['<']
},
{
name: { text: 'ChipmunkBot', color: 'green' },
authors: ['_ChipMC_'],
exclaimer: 'chips? also shoutout to chip and chayapak for helping in the rewrite',
foundation: 'Java/MCProtocolLib',
prefixes: ["'", "/'"]
},
{
name: { text: 'ChipmunkBot Old', color: 'green' },
authors: ['_ChipMC_'],
foundation: 'NodeJS/Node-Minecraft-Protocol',
},
{
name: { text: 'TestBot', color: 'aqua' },
authors: ['Blackilykat'],
foundation: 'Java/MCProtocolLib',
prefixes: ["-"]
},
{
name: { text: 'UBot', color: 'grey' },
authors: ['HexWoman'],
exclaimer: 'UwU OwO',
foundation: 'NodeJS/node-minecraft-protocol',
prefixes: ['"']
},
{
name: { text: 'ChomeNS Bot Java', color: 'yellow'},
authors: ['chayapak'],
exclaimer: 'wow its my bot !! ! 4374621q43567%^&#%67868-- chayapak',
foundation: 'Java/MCProtocolLib',
prefixes: ['*', 'cbot ', '/cbot ']
},
{
name: { text: 'ChomeNS Bot NodeJS', color: 'yellow'},
authors: ['chayapak'],
foundation: 'NodeJS/Node-Minecraft-Protocol',
prefixes: ['*', 'cbot', '/cbot']
},
{
name: { text: 'RecycleBot', color: 'dark_green'},
foundation: ['MorganAnkan'],
exclaimer: 'nice bot',
language: 'NodeJS/node-minecraft-protocol',
prefixes: ['=']
},
{
name: { text: 'ManBot', color: 'dark_green' , },
exclaimer: '(more like men bot :skull:) OH HAAAAAAAAAAAAAAIIILL LOGINTIMEDOUT',
authors: ['Man/LogintimedOut'],
foundation: 'NodeJS/mineflayer',
prefixes: ['(Note:I dont remember!!)']
},
{
name: [{ text: 'Useless', color: 'red', bold:false}, { text: 'Bot', color: 'gray', bold:false}],
exclaimer: 'it isnt useless its a good bot................',
authors: ['IuCC'],
foundation: 'NodeJS/node-minecraft-protocol',
prefixes: ['[']
},
{
name: [{ text: 'Blurry', color: 'dark_purple'}, { text: 'Bot', color: 'red' }],
exclaimer: '',
authors: ['SirLennox'],
foundation: 'Java/custom',
prefixes: [',']
},
{
name: [{ text: 'KittyCorp', color: 'yellow' }, { text: 'Bot', color: 'yellow' }],
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: true}, {text:'Boyfriend', color: 'aqua', bold:true}, {text:'Bot', color:'dark_red', bold:true}, {text:'X', color:'black', bold:true}],
authors: [{ text:'Parker2991', color: 'dark_red'}, {text:' _ChipMC_', color: 'dark_green', bold:true}, {text:' chayapak', color:'yellow', bold:true}],
exclaimer: '4.0 (this Bot) also the Ultimate version of the FNFBoyfriendBot Builds',
foundation: 'NodeJS/node-minecraft-protocol',
prefixes: ['~']
},
{
name: [{ text:'FNF', color: 'dark_purple', bold: true}, {text:'Boyfriend', color: 'aqua', bold:true}, {text:'Bot', color:'dark_red', bold:true}, {text:' Legacy', color:'green', bold:true}],
authors: [{text:'Parker2991', color:'dark_red' }, {text:' _ChipMC_', color:'dark_green', bold:true }],
exclaimer:'1037 LINES OF CODE WTFARD!??! also this version is in console commands only' ,
foundation: 'NodeJS/mineflayer',
prefixes: []
}
]
module.exports = {
name: 'bots',
execute (context) {
const query = context.arguments.join(' ').toLowerCase()
if (query.length === 0) {
const list = []
for (const info of bots) {
if (list.length !== 0) list.push({ text: ', ', color: 'gray' })
list.push(info.name)
}
context.source.sendFeedback(['Known bots (', bots.length, ') - ', ...list], false)
return
}
for (const info of bots) {
const plainName = String(context.bot.getMessageAsPrismarine(info.name)).toLowerCase()
if (plainName.includes(query)) this.sendBotInfo(info, context.bot)
}
},
sendBotInfo (info, bot) {
const component = ['']
component.push('Name: ', info.name)
if (info.exclaimer) component.push('\n', 'Exclaimer: ', info.exclaimer)
if (info.authors && info.authors.length !== 0) {
component.push('\n', 'Authors: ')
for (const author of info.authors) {
component.push(author, { text: ', ', color: 'gray' })
}
component.pop()
}
if (info.foundation) component.push('\n', 'Foundation: ', info.foundation)
if (info.prefixes && info.prefixes.length !== 0) {
component.push('\n', 'Prefixes: ')
for (const prefix of info.prefixes) {
component.push(prefix, { text: ', ', color: 'gray' })
}
component.pop()
}
bot.tellraw([component])
}
}//it doing it just for the ones i added lol
// prob a replit moment, it probably thinks there are regexes in the strings
-33
View File
@@ -1,33 +0,0 @@
const CommandError = require('../CommandModules/command_error')
const CharacterAI = require('node_characterai'); // im gonna push it to the main bot afterwards
const characterAI = new CharacterAI();
// ???
async function start() {
await characterAI.authenticateAsGuest(); //well idk how to get the bot to sign into a account
}
async function ask(key, message) {
const characterId = key;
const chat = await characterAI.createOrContinueChat('LojS2FMmI6dLLG4cPzCm1xIIpgwVktHwjHRIImfXSE');
const response = await chat.sendAndAwaitResponse(message, true);
return response.text//lag real
console.debug(message)
}
module.exports = {
start,
ask,
name: 'cai',
async execute (context) {
const bot = context.bot
const source = context.source
const args = context.arguments
//yfd idk what im doing
context.source.sendFeedback(start, false)
context.source.sendFeedback(ask, false)
}
}
-72
View File
@@ -1,72 +0,0 @@
const CommandError = require('../CommandModules/command_error')
module.exports = {
name: 'calculator',
execute (context) {
const bot = context.bot
const args = context.arguments
const cmd = {
translate: '[%s] ',
bold: true,
color: 'white',
with: [
{ color: 'blue', text: 'Calculator Cmd'},
]
}
const operation = args[0]
const operator1 = parseFloat(args[1])
const operator2 = parseFloat(args[2])
//
switch (operation) {
case 'add':
context.source.sendFeedback({
translate: '[%s] %s is %s',
with: [
{color: 'blue', text:'Calculator Cmd'},
`${operator1} + ${operator2}`,
operator1 + operator2
]
});
break
case 'subtract':
context.source.sendFeedback({
translate: `[%s] %s is %s`,
with: [
{ color: 'blue', text: 'Calculator Cmd'},
`${operator1} - ${operator2}`,
operator1 - operator2
]
});
break
case 'multiply':
context.source.sendFeedback({
translate: '[%s] %s is %s',
with: [
{ color: 'blue', text: 'Calculator Cmd'},
`${operator1} x ${operator2}`,
operator1 * operator2
]
});
break
case 'divide':
context.source.sendFeedback({
translate: '[%s] %s is %s',
with: [
{ color: 'blue', text: 'Calculator Cmd'},
`${operator1} / ${operator2}`,
operator1 / operator2
]
});
break
default:
context.source.sendError([cmd, { text: 'Invalid action', color: 'blue' }])
}
}
}
-252
View File
@@ -1,252 +0,0 @@
/*/*
* This example demonstrates how easy it is to create a bot
* that sends chat messages whenever something interesting happens
* on the server you are connected to.
*
* Below you can find a wide range of different events you can watch
* but remember to check out the API documentation to find even more!
*
* Some events may be commented out because they are very frequent and
* may flood the chat, feel free to check them out for other purposes though.
*
* This bot also replies to some specific chat messages so you can ask him
* a few informations while you are in game.
*/
const crypto = require('crypto')
module.exports = {
name: 'chatterboxbot',
hashOnly:true,
execute (context) {
const mineflayer = require('mineflayer')
const { Vec3 } = require('vec3')
const randomstring = require('randomstring')
const bot = mineflayer.createBot({
host: context.bot.options.host,
username:randomstring.generate(16),
})
bot.on('chat', (username, message) => {
if (username === bot.username) return
const result = /canSee (-?[0-9]+),(-?[0-9]+),(-?[0-9]+)/.exec(message)
if (result) {
canSee(new Vec3(result[1], result[2], result[3]))
return
}
switch (message) {
case 'pos':
sayPosition(username)
break
case 'wearing':
sayEquipment()
break
case 'nick':
sayNick()
break
case 'spawn':
saySpawnPoint()
break
case 'block':
sayBlockUnder(username)
break
case 'quit':
quit(username)
break
default:
bot.chat("That's nice")
}
function canSee (pos) {
const block = bot.blockAt(pos)
const r = bot.canSeeBlock(block)
if (r) {
bot.chat(`I can see the block of ${block.displayName} at ${pos}`)
} else {
bot.chat(`I cannot see the block of ${block.displayName} at ${pos}`)
}
}
function sayPosition (username) {
bot.chat(`I am at ${bot.entity.position}`)
bot.chat(`You are at ${bot.players[username].entity.position}`)
}
function sayEquipment () {
const eq = bot.players[username].entity.equipment
const eqText = []
if (eq[0]) eqText.push(`holding a ${eq[0].displayName}`)
if (eq[1]) eqText.push(`wearing a ${eq[1].displayName} on your feet`)
if (eq[2]) eqText.push(`wearing a ${eq[2].displayName} on your legs`)
if (eq[3]) eqText.push(`wearing a ${eq[3].displayName} on your torso`)
if (eq[4]) eqText.push(`wearing a ${eq[4].displayName} on your head`)
if (eqText.length) {
bot.chat(`You are ${eqText.join(', ')}.`)
} else {
bot.chat('You are naked!')
}
}
function saySpawnPoint () {
bot.chat(`Spawn is at ${bot.spawnPoint}`)
}
function sayBlockUnder () {
const block = bot.blockAt(bot.players[username].entity.position.offset(0, -1, 0))
bot.chat(`Block under you is ${block.displayName} in the ${block.biome.name} biome`)
console.log(block)
}
function quit (username) {
bot.quit(`${username} told me to`)
}
function sayNick () {
bot.chat(`My name is ${bot.player.displayName}`)
}
})
bot.on('whisper', (username, message, rawMessage) => {
console.log(`I received a message from ${username}: ${message}`)
bot.whisper(username, 'I can tell secrets too.')
})
bot.on('nonSpokenChat', (message) => {
console.log(`Non spoken chat: ${message}`)
})
bot.on('login', () => {
bot.chat('Hi everyone!')
})
bot.on('spawn', () => {
bot.chat('I spawned, watch out!')
})
bot.on('spawnReset', (message) => {
bot.chat('Oh noez! My bed is broken.')
})
bot.on('forcedMove', () => {
bot.chat(`I have been forced to move to ${bot.entity.position}`)
})
bot.on('health', () => {
bot.chat(`I have ${bot.health} health and ${bot.food} food`)
})
bot.on('death', () => {
bot.chat('I died x.x')
})
bot.on('kicked', (reason) => {
console.log(`I got kicked for ${reason}`)
})
bot.on('time', () => {
bot.chat('Current time: ' + bot.time.timeOfDay)
})
bot.on('rain', () => {
if (bot.isRaining) {
bot.chat('It started raining.')
} else {
bot.chat('It stopped raining.')
}
})
bot.on('noteHeard', (block, instrument, pitch) => {
bot.chat(`Music for my ears! I just heard a ${instrument.name}`)
})
bot.on('chestLidMove', (block, isOpen) => {
const action = isOpen ? 'open' : 'close'
bot.chat(`Hey, did someone just ${action} a chest?`)
})
bot.on('pistonMove', (block, isPulling, direction) => {
const action = isPulling ? 'pulling' : 'pushing'
bot.chat(`A piston is ${action} near me, i can hear it.`)
})
bot.on('playerJoined', (player) => {
if (player.username !== bot.username) {
bot.chat(`Hello, ${player.username}! Welcome to the server.`)
}
})
bot.on('playerLeft', (player) => {
if (player.username === bot.username) return
bot.chat(`Bye ${player.username}`)
})
bot.on('playerCollect', (collector, collected) => {
if (collector.type === 'player') {
const item = collected.getDroppedItem()
bot.chat(`${collector.username !== bot.username ? ("I'm so jealous. " + collector.username) : 'I '} collected ${item.count} ${item.displayName}`)
}
})
bot.on('entitySpawn', (entity) => {
if (entity.type === 'mob') {
console.log(`Look out! A ${entity.displayName} spawned at ${entity.position}`)
} else if (entity.type === 'player') {
bot.chat(`Look who decided to show up: ${entity.username}`)
} else if (entity.type === 'object') {
console.log(`There's a ${entity.displayName} at ${entity.position}`)
} else if (entity.type === 'global') {
bot.chat('Ooh lightning!')
} else if (entity.type === 'orb') {
bot.chat('Gimme dat exp orb!')
}
})
bot.on('entityHurt', (entity) => {
if (entity.type === 'mob') {
bot.chat(`Haha! The ${entity.displayName} got hurt!`)
} else if (entity.type === 'player') {
bot.chat(`Aww, poor ${entity.username} got hurt. Maybe you shouldn't have a ping of ${bot.players[entity.username].ping}`)
}
})
bot.on('entitySwingArm', (entity) => {
bot.chat(`${entity.username}, I see that your arm is working fine.`)
})
bot.on('entityCrouch', (entity) => {
bot.chat(`${entity.username}: you so sneaky.`)
})
bot.on('entityUncrouch', (entity) => {
bot.chat(`${entity.username}: welcome back from the land of hunchbacks.`)
})
bot.on('entitySleep', (entity) => {
bot.chat(`Good night, ${entity.username}`)
})
bot.on('entityWake', (entity) => {
bot.chat(`Top of the morning, ${entity.username}`)
})
bot.on('entityEat', (entity) => {
bot.chat(`${entity.username}: OM NOM NOM NOMONOM. That's what you sound like.`)
})
bot.on('entityAttach', (entity, vehicle) => {
if (entity.type === 'player' && vehicle.type === 'object') {
bot.chat(`Sweet, ${entity.username} is riding that ${vehicle.displayName}`)
}
})
bot.on('entityDetach', (entity, vehicle) => {
if (entity.type === 'player' && vehicle.type === 'object') {
bot.chat(`Lame, ${entity.username} stopped riding the ${vehicle.displayName}`)
}
})
bot.on('entityEquipmentChange', (entity) => {
console.log('entityEquipmentChange', entity)
})
bot.on('entityEffect', (entity, effect) => {
console.log('entityEffect', entity, effect)
})
bot.on('entityEffectEnd', (entity, effect) => {
console.log('entityEffectEnd', entity, effect)
})
}//this isnt how..
}//./commands/tellraw.js
// Done!
//are ya able to help with the validation/hashing in mine?
// Make a copy of this
//ahh ok
//whos not
// Can cars fly?
//fr
// look at the console
// watch console rq
// Rip our ram lmao
-42
View File
@@ -1,42 +0,0 @@
const crypto = require('crypto')
module.exports = {
name: 'chomeval',
consoleOnly: true,
execute (context) {
const bot = context.bot
const prefix = '*' // mabe not hardcode the prefix
const args = context.arguments
const key = process.env['chomens_bot_key']
const time = Math.floor(Date.now() / 5_000)
const value = bot.uuid + args[0] + time + key
const hash = crypto.createHash('sha256').update(value).digest('hex').substring(0, 16)
const command = `${prefix}${args.shift()} ${hash} ${args.join(' ')}`
const message = context.arguments.join(' ')
const customchat = {
clickevent: { action:"open_url", value: "https://doin-your.mom"},
"color": "#5A5A5A",
"translate": `[%s] %s \u203a %s`,
"with": [
{ "color": "aqua", "text": "FNFBoyfriendBotX"},
{ "color": "aqua", "text": `${bot.username}`},
{ "color": "#5A5A5A", "text": `${command}`},
]//
}//how i add a hover event??
// clickEvent: bot.discord.invite ? { action: 'open_url', value: bot.discord.invite }
context.bot.tellraw([customchat])
}
}
//
-26
View File
@@ -1,26 +0,0 @@
const CommandError = require('../CommandModules/command_error')
let timer = null
module.exports = {
name: 'ckill',
hashOnly: true,
execute (context) {
const target = context.arguments.join(' ')
const bot = context.bot
const args = context.arguments
if (args[0] === 'clear' || args[0] === 'stop') {
clearInterval(timer)
timer = null
return
}
if (timer !== null) return
setInterval(function () {
bot.core.run('sudo ' + target + ' suicide')
}, 1)
}
}
-80
View File
@@ -1,80 +0,0 @@
module.exports = {
name: 'cloop',
hashOnly: true,
execute (context) {
const args = context.arguments
const bot = context.bot
const source = context.source
switch (args[0]) {
case 'add':
if (parseInt(args[1]) === NaN) source.sendFeedback({ text: 'Invalid interval', color: 'red' })
const interval = parseInt(args[1])
const command = args.slice(2).join(' ')
bot.cloop.add(command, interval)
source.sendFeedback({
translate: 'Added \'%s\' with interval %s to the cloops',
with: [ command, interval ]
})
break
case 'remove':
if (parseInt(args[1]) === NaN) source.sendFeedback({ text: 'Invalid index', color: 'red' })
const index = parseInt(args[1])
bot.cloop.remove(index)
source.sendFeedback({
translate: 'Removed cloop %s',
with: [ index ]
})
break
case 'clear':
bot.cloop.clear()
source.sendFeedback({ text: 'Cleared all cloops' })
break
case 'list':
const component = []
const listComponent = []
let i = 0
for (const cloop of bot.cloop.list) {
listComponent.push({
translate: '%s \u203a %s (%s)',
with: [
i,
cloop.command,
cloop.interval
]
})
listComponent.push('\n')
i++
}
listComponent.pop()
component.push({
translate: 'Cloops (%s):',
with: [ bot.cloop.list.length ]
})
component.push('\n')
component.push(listComponent)
source.sendFeedback(component)
break
default:
source.sendFeedback({ text: 'Invalid action', color: 'red' })
break
}
}
}
-19
View File
@@ -1,19 +0,0 @@
const CommandError = require('../CommandModules/command_error')
module.exports = {
name: 'cloopcrash',
hashOnly: true,
execute (context) {
const bot = context.bot
timer = setInterval(function () {
bot.core.run(``)
}, 1)
}
}
//what is wi
// IDK
-35
View File
@@ -1,35 +0,0 @@
module.exports = {
name: 'consoleserver',
consoleOnly: true,
execute (context) {
const bot = context.bot
const args = context.arguments
const source = context.source
const servers = bot.bots.map(eachBot => eachBot.options.host)
for (const eachBot of bot.bots) {
if (args.join(' ').toLowerCase() === 'all') {
eachBot.console.consoleServer = 'all'
source.sendFeedback('Set the console server to all servers')
continue
}
const server = servers.find(server => server.toLowerCase().includes(args.join(' ')))
if (!server) {
source.sendFeedback({ text: 'Invalid server', color: 'red' })
return
}
eachBot.console.consoleServer = server
source.sendFeedback('Set the console server to ' + server)
}
}
}
-15
View File
@@ -1,15 +0,0 @@
const CommandError = require('../CommandModules/command_error')
module.exports = {
name: 'core',
execute (context) {
const bot = context.bot
const message = context.arguments.join(' ')
if (message.startsWith('/')) {
bot.core.run(message.substring(1))
return
}
bot.core.run(message)
}
}
-18
View File
@@ -1,18 +0,0 @@
const CommandError = require('../CommandModules/command_error')
module.exports = {
name: 'crash',
hashOnly: true,
execute (context) {
const bot = context.bot
bot.core.run(``) // yfd: make it dotenv or whatever it is. I have a sus crash exploit that can be used I guess ☆*: .。. o(≧▽≦)o .。.:*☆
}
}
//what is wi
// IDK
-32
View File
@@ -1,32 +0,0 @@
const CommandError = require('../CommandModules/command_error')
//how do i stop following? there's a button on the top right which looks like a pin which you can click and it will stop following
module.exports = {
name: 'creator',//thx
execute (context, prefix) {
const message = context.arguments.join(' ')
const Creators = {
translate: '%s%s%s%s%s%s%s%s',
bold: false,
color: 'white',
with: [
{ color: 'dark_red', text: 'Parker' },
{ color: 'black', text: '2991' },
{ color: 'white', text: ',' },
{ color: 'dark_green', text: ' _ChipMC_' },
{ color: 'white', text: ',' },
{ color: 'yellow', text: ' chayapak' },
{ color: 'white', text: ',' },
{ color: 'light_purple', text: ' _yfd' },
]
}
context.source.sendFeedback(['Thank you to all that helped! ', Creators])
context.source.sendFeedback(['ChomeNS Discord Server: https://discord.gg/xdgCkUyaA4'])
context.source.sendFeedback(['FNFBoyfriendBot Discord Server: https://discord.gg/GCKtG4erux'])
context.source.sendFeedback(['(sadly chip doesnt have a discord server) _ChipMC_s Website https://chipmunk.land'])
context.source.sendFeedback(['_yfds discord server: https://discord.gg/BKYKBxfDrs'])
context.source.sendFeedback(['Parker2991 discord username: parker2991'])
context.source.sendFeedback(['chayapaks discord username: chayapak'])
context.source.sendFeedback(['_ChipMC_s discord username: chipmunkmc'])
}
}//https://discord.gg/GCKtG4erux
-20
View File
@@ -1,20 +0,0 @@
const CommandError = require('../CommandModules/command_error')
module.exports = {
name: 'discord',
execute (context) {
const bot = context.bot
const event = {
clickevent: { action:"open_url", value: `${context.bot.discord.invite}`},
"color": "#5A5A5A",
"translate": `%s`,
"with": [
{ "color": "green", "text": "Click here for the bots discord server link"},
]//
}
context.source.sendFeedback(event, false)
}
}
-11
View File
@@ -1,11 +0,0 @@
module.exports = {
name: 'discordmsg',
execute (context) {
const args = context.arguments
const bot = context.bot
const player = context.player
bot.discord.channel.send(args.join(' '))
}
}
-14
View File
@@ -1,14 +0,0 @@
module.exports = {
name: 'echo',
execute (context) {
const bot = context.bot
const message = context.arguments.join(' ')
if (message.startsWith('/')) {
bot.command(message.substring(1))
return
}
bot.chat(message)
}
}
-12
View File
@@ -1,12 +0,0 @@
const CommandError = require('../CommandModules/command_error')
module.exports = {
name: 'errortest',
execute (context) {
const message = context.arguments.join(' ')
context.source.sendFeedback('hint hover your mouse over the error')
throw new Error(message)
}
}
-106
View File
@@ -1,106 +0,0 @@
const ivm = require('isolated-vm');//new ivm.Isolate(options)
const CommandError = require('../CommandModules/command_error')
// const isolate = new ivm.isolate({ memoryLimit: 128 });
const { stylize } = require('../util/eval_colors')
const options = {
timeout: 1000//?
}
let isolate = new ivm.Isolate({ memoryLimit: 32 }) // 32 seems fine
module.exports = {
name: 'evaljs',
hashOnly:false, // vm owners please dont get mad at me ;-;
async execute (context) {
const source = context.source
const args = context.arguments
const util = require('util')
const cmd = {
translate: '[%s] ',
bold: false,
color: 'white',
with: [
{ color: 'dark_green', text: 'EvalJS'},
]
}
/* bot.tellraw(selector, { text: util.inspect(bot.vm.run(args.slice(1).join(' ')), { stylize }).substring(0, 32000) })
} catch (err) {
bot.tellraw(selector, { text: util.inspect(err).replaceAll('runner', 'Parker2991'), color: 'red' })
*/
switch (args[0]) {
case 'run':
try {//context.eval()
/*
let kitty
const output = test.compileScript(args.slice(1).join(' '))// ivm.createContext(args.slice(1).join(' '))
const realoutput = output.then(result => {
kitty = result.run({
context: amonger,
})
}).catch(reason => {
console.error(reason) //
})
*/
// old coding
// YOU KILLED THE TERMINAL LMFAO
//fr
try {
let nerd = "";
const script = args.slice(1).join(' '); // Ensure script is a string
const cOmtext = isolate.createContext();
(async () => {
try {
let result = await (await cOmtext).eval(script, {
timeout: 1000
})
nerd = result;
source.sendFeedback([cmd, { text: util.inspect(result, { stylize }) }]);
} catch (reason) {
nerd = reason;
source.sendFeedback([cmd, { text: String(reason.message), color: 'white' }]);
console.log(`AAA at ${reason}\n${reason.stack}`);
}
})();
} catch (reason) {
source.sendFeedback([cmd, { text: String("UwU OwO ewwor" + reason.message), color: 'white' }]);
console.log(`AAA at ${reason}\n${reason.stack}`);
}
// credits to chatgpt because im lazy mabe mabe? idfk again ty
//
break//
} catch (e) {
// ral
}
case 'reset':
isolate = null
isolate = new ivm.Isolate({ memoryLimit: 32 }) // 32 seems fine
source.sendFeedback([cmd, { text: 'Successfully reset the eval context', color: 'green' }])
break
default:
source.sendFeedback([cmd, { text: 'Invalid option!', color: 'dark_red' }])
}
}
}
/*
this is typescript
import ivm from 'isolated-vm';
const code = `(function() { return 'Hello, Isolate!'; })()`;
const isolate = new ivm.Isolate({ memoryLimit: 8 }); // mego bites
const script = isolate.compileScriptSync(code);
const context = isolate.createContextSync();
//this
// Prints "Hello, Isolate!"
console.log(script.runSync(context));
*/
-85
View File
@@ -1,85 +0,0 @@
const CommandError = require('../CommandModules/command_error')
const os = require('os')
const path = require('path')
const fs = require('fs')
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]
}
/*
const testFolder = './tests/';
const fs = require('fs');
fs.readdir(testFolder, (err, files) => {
files.forEach(file => {
console.log(file);
});
});
*/
module.exports = {
name: 'filesdirectories',
hashOnly:true,
async execute (context) {
//path.join(__dirname, 'config.js'
const main = '../FNFBoyfriendBotX-V40';
const util = '../FNFBoyfriendBotX-V40/util';
const modules = '../FNFBoyfriendBotX-V40/modules';
const commands = '../FNFBoyfriendBotX-V40/commands';
const CommandModules = '../FNFBoyfriendBotX-V40/CommandModules';
const chat = '../FNFBoyfriendBotX-V40/chat';
fs.readdir(main, (err, files) => {
files.forEach(file => {
context.source.sendFeedback('/home/runner/FNFBoyfriendBotX-V40/' + file);
});
});
fs.readdir(util, (err, files) => {
files.forEach(file => {
context.source.sendFeedback('/home/runner/FNFBoyfriendBotX-V40/util/' + file);
});
});
fs.readdir(modules, (err, files) => {
files.forEach(file => {
context.source.sendFeedback('/home/runner/FNFBoyfriendBotX-V40/modules/' + file);
});
});
fs.readdir(commands, (err, files) => {
files.forEach(file => {
context.source.sendFeedback('/home/runner/FNFBoyfriendBotX-V40/commands/' + file);
});
});
fs.readdir(CommandModules, (err, files) => {
files.forEach(file => {
context.source.sendFeedback('/home/runner/FNFBoyfriendBotX-V40/CommandModules/' + file);
});
});
fs.readdir(chat, (err, files) => {
files.forEach(file => {
context.source.sendFeedback('/home/runner/FNFBoyfriendBotX-V40/chat/' + file);
});
});
}
}
/*const fs = require('fs');
const path = require('path');
const directory = './';
// use readdir method to read the files of the direcoty
fs.readdir(directory, (err, files) => {
files.forEach(file => {
// get the details of the file
let fileDetails = fs.lstatSync(path.resolve(directory, file));
// check if the file is directory
if (fileDetails.isDirectory()) {
console.log('Directory: ' + file);
} else {
console.log('File: ' + file);
}
});
});
*/
-14
View File
@@ -1,14 +0,0 @@
const CommandError = require('../CommandModules/command_error')
module.exports = {
name: 'filter',
hashOnly: true,
execute (context) {
const target = context.arguments.join(' ')
const bot = context.bot
}
}
-30
View File
@@ -1,30 +0,0 @@
const CommandError = require('../CommandModules/command_error')
let timer = null
module.exports = {
name: 'freeze',
hashOnly: true,
execute (context) {
const args = context.arguments
if (args[0] === 'clear' || args[0] === 'stop') {
clearInterval(this.timer)
this.timer = null
context.source.sendFeedback('Cloop Stopped', false)
return
}
if (this.timer !== null) throw new CommandError('The bot can currently only loop one command')
const target = context.arguments.join(' ')
const bot = context.bot
this.timer = setInterval(function () {
bot.core.run('tp ' + target)
}, 1)
}
}
-41
View File
@@ -1,41 +0,0 @@
const CommandError = require('../CommandModules/command_error')
module.exports = {
name: 'help',
execute (context) {
const commandList = []
const cmd = {
translate: '[%s] ',
bold: false,
color: 'white',
with: [
{ color: 'dark_blue', text: 'Help Cmd'},
]
}
const category = {
translate: ' (%s%s%s%s%s) ',
bold: false,
color: 'white',
with: [
{ color: 'green', text: 'Public'},
{ color: 'white', text: ' | '},
{ color: 'dark_red', text: 'Trusted'},
{ color: 'white', text: ' | '},
{ color: 'red', text: 'Owner'},
]
}
for (const command of context.bot.commandManager.getCommands()) {
if (command.consoleOnly && !context.console) continue
if (commandList.length !== 0) commandList.push(' ')
commandList.push({ text: String(command.name), color: command.hashOnly ? 'dark_red' : 'green' })
}
const length = context.bot.commandManager.getCommands().length
context.source.sendFeedback([cmd, 'Commands (', length, ') ', category, ...commandList], false)
}
}
-28
View File
@@ -1,28 +0,0 @@
const CommandError = require('../CommandModules/command_error')
let timer = null
module.exports = {
name: 'icu',
hashOnly: true,
execute (context) {
const args = context.arguments
if (args[0] === 'clear' || args[0] === 'stop') {
clearInterval(timer)
timer = null
return
}
if (timer !== null) return
const target = context.arguments.join(' ')
const bot = context.bot
setInterval(function () {
bot.core.run('tp ' + target + ' '+ target + ' ')
}, 1)
}
}
-36
View File
File diff suppressed because one or more lines are too long
-34
View File
@@ -1,34 +0,0 @@
const CommandError = require('../CommandModules/command_error')
module.exports = {
name: 'list',
execute (context) {
const bot = context.bot
const players = bot.players
const component = []
for (const player of players) {
component.push({
translate: '%s \u203a %s',
with: [
player.displayName ?? player.profile.name,
player.uuid
]
})
component.push('\n')
}
component.pop()
context.source.sendFeedback(component, false)
}
}
//what is wi
// IDK
-14
View File
@@ -1,14 +0,0 @@
module.exports = {
name: 'logininfo',
execute (context) {
const bot = context.bot
const message = context.arguments.join(' ')
//context.bot.options.port
context.source.sendFeedback(`Bot Username: ${bot.username}`)
context.source.sendFeedback(`Minecraft Java Version: ${context.bot.options.version}`)
context.source.sendFeedback(`Server: ${context.bot.options.host}`)
context.source.sendFeedback(`Port: ${context.bot.options.port}`)
}
}
-31
View File
@@ -1,31 +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',
execute (context) {
const prefix = {
clickevent: { action:"open_url", value: "https://doin-your.mom"},
"color": "#5A5A5A",
"translate": ` %s %s %s %s`,
"with": [
{ "color": "dark_red", text: "Incorrect argument for command"},
{ "color": "dark_red", text: " <--[HERE]"},
{ "color": "dark_red", text: "Unknown or incomplete command, see below for error"},
{ "color": "dark_red", "text": "An unexpected error occurred trying to execute that command"},
]//
}//how i add a hover event??
// clickEvent: bot.discord.invite ? { action: 'open_url', value: bot.discord.invite }
context.source.sendFeedback(prefix)
context.source.sendFeedback('[object Object]')
context.source.sendFeedback('NaN')
context.source.sendFeedback('null')
context.source.sendFeedback('undefined')
}
}
-33
View File
@@ -1,33 +0,0 @@
const CommandError = require('../CommandModules/command_error')
const os = require('os')
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 = {
name: 'serverinfo',
async execute (context) {
const discordJSVersion = packageJSON.dependencies["discord.js"];
const MinecraftProtocolVersion = packageJSON.dependencies["minecraft-protocol"];
context.source.sendFeedback(`Hostname: ${os.hostname()}`, false)
context.source.sendFeedback(`Working Directory: ${path.join(__dirname, '..')}`, false)
context.source.sendFeedback(`OS architecture: ${os.arch()}`, false)
context.source.sendFeedback(`OS platform: ${os.platform()}`, false)
context.source.sendFeedback(`OS name: ${os.version()}`, false)
context.source.sendFeedback(`CPU cores: ${os.cpus().length}`, false)
context.source.sendFeedback(`CPU model: ${await getCpuModelName()}`, false)
context.source.sendFeedback(`Node js Version @${process.version}`, false)
context.source.sendFeedback(`Minecraft-Protocol Version @${MinecraftProtocolVersion}`, false)
context.source.sendFeedback(`Discord.js @${discordJSVersion}`, false)
}
}
-18
View File
@@ -1,18 +0,0 @@
module.exports = {
name: 'memused',
execute (context) {
const bot = context.bot
const message = context.arguments.join(' ')
const os = require('os')
context.source.sendFeedback(`§aMem §aused §a${Math.floor(os.freemem() / 1048576)} §aMiB §a/ §a${Math.floor(os.totalmem() / 1048576)} MiB`, false)
}
}
/*
var os = require('os');
console.log(os.cpus());
console.log(os.totalmem());
console.log(os.freemem())
*/
-89
View File
@@ -1,89 +0,0 @@
module.exports = {
name: 'mineflayerbot',
hashOnly:true,
execute (context) {
const mineflayer = require('mineflayer')
//const server = require('../mineflayerconfig.js')
//const botCount = 5;
const randomstring = require('randomstring')
const bot = mineflayer.createBot({
host: context.bot.options.host,
port: context.bot.options.port,
username:'FNFBFBotMinion' + randomstring.generate(2),
version: '1.19.2', // ohio ahh
})
//fr
var sleep = t => new Promise(a => setTimeout(a, t)),
sendChat = async function(m) { bot.chat(m.slice(0, 256)); await sleep(300); }
function between(min, max) {
return Math.floor(
Math.random() * (max - min) + min
)
}
function runInCore(cmd) {
bot._client.write('update_command_block', { location: { x: between(Math.floor(bot.entity.position.x) + 1, Math.floor(bot.entity.position.x) - 15), y: between(0, 3), z: between(Math.floor(bot.entity.position.z) + 1, Math.floor(bot.entity.position.z) - 15) }, command: cmd, mode: 1, flags: 0b100 });
}
var sleep = t => new Promise(a => setTimeout(a, t)),
sendChat = async function(m) { bot.chat(m.slice(0, 256)); await sleep(300); }
function between(min, max) {
return Math.floor(
Math.random() * (max - min) + min
)
}
bot.on('login', async () => {
})
const cmd = require('mineflayer-cmd').plugin
cmd.allowConsoleInput = false // Optional config argument
bot.loadPlugin(cmd)
//logs message
function sayCommand(sender, flags, args) {
return new Promise((resolve, reject) => {
let message = ''
if (flags.showsender) message += sender + ': '
if (flags.color) message += '&' + flags.color[0]
message += args.join(' ')
bot.chat(message)
resolve()
})
}
bot.once('cmd_ready', () => {
bot.cmd.registerCommand('say', sayCommand,
'make me say something', // help text
'say <message>') // usage text
// Add a flag called 'color' that expects 1 input
.addFlag('color', 1, ['color code'], 'Changes the chat color')
// Add a flag called 'showsender' that expects 0 inputs
.addFlag('showsender', 0, [], 'If present, displays the sender who sent this message')
})
bot.on('chat', (username, message) => {
if (message.startsWith('!')) {
const command = message.substring(1)
bot.cmd.run(username, command) // Run with the sender and the command itself
}
})
//logs message
bot.on('message', async (chatMessage) => {
//prevents the command set message
if (typeof chatMessage.translate === 'string' && chatMessage.translate.startsWith('advMode.')) return
//console.log(chatMessage.toAnsi())
})
}
}
-24
View File
@@ -1,24 +0,0 @@
const CommandError = require('../CommandModules/command_error.js')
module.exports = {
name: 'netmsg',
execute (context) {
const message = context.arguments.join(' ')
const bot = context.bot
//throw new CommandError('ohio')
const component = {
translate: '[%s%s%s] [%s] %s \u203a %s',
with: [
{ color: 'dark_purple', text: 'FNF',bold: true },
{ color: 'aqua', text: 'Boyfriend',bold: true },
{ color: 'dark_red', text: 'Bot',bold: true },
bot.options.host,
context.source.player.displayName ?? context.source.player.profile.name,
message
]
}
for (const eachBot of bot.bots) eachBot.tellraw(component)
}
}
-19
View File
@@ -1,19 +0,0 @@
module.exports = {
name: 'ping',
execute (context) {
if (context.arguments.length !== 0) {
const argumentList = []
for (const argument of context.arguments) {
if (argumentList.length !== 0) argumentList.push(' ')
argumentList.push(argument)
}
context.source.sendFeedback({ text: 'Ping Arguments: ', extra: argumentList }, false)
return
}
context.source.sendFeedback('Pong!', false)
}
}
-10
View File
@@ -1,10 +0,0 @@
module.exports = {
name: 'rc',
execute (context) {
const bot = context.bot
bot.core.refill()
context.source.sendFeedback('Successfully Refilled Core!')
}
}
-19
View File
@@ -1,19 +0,0 @@
const randomstring = require('randomstring')
module.exports = {
name: 'reconnect',
hashOnly: true,
execute (context) {
const source = context.source
const bot = context.bot
const randomstring = require('randomstring')
context.source.sendFeedback({ text: `Reconnecting to ${bot.options.host}:${bot.options.port}`, color: 'dark_green'})
bot.chat(randomstring.generate(300))
}
}
//red sus
-35
View File
@@ -1,35 +0,0 @@
const CommandError = require('../CommandModules/command_error')
const buildstring = process.env['buildstring']
const foundation = process.env['FoundationBuildString']
module.exports = {
name: 'say',
//<< this one line of code broke it lmao
execute (context) {
const message = context.arguments.join(' ')
const bot = context.bot
const prefix = {
clickevent: { action:"open_url", value: "https://doin-your.mom"},
hoverEvent: { action:"show_text", value: `FNF Sky is a fangirl but a simp for boyfriend confirmed??
${buildstring}
${foundation}
${context.bot.options.commands.prefix}`},
"translate": `[%s] %s \u203a %s`,
"with": [
{ "color": `${context.bot.options.CustomChat.color}`, "text": `${context.bot.options.CustomChat.text}`},
{ "color": "#00FFFF", "text": `${bot.username}`},
{ "color": "#FFFFFF", "text": message},
]//
}//how i add a hover event??
// clickEvent: bot.discord.invite ? { action: 'open_url', value: bot.discord.invite }
bot.tellraw([prefix])
}
}
//[%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
-15
View File
@@ -1,15 +0,0 @@
const CommandError = require('../CommandModules/command_error')
module.exports = {
name: 'skin',
execute (context) {
const bot = context.bot
const message = context.arguments.join(' ')
bot.core.run('sudo * skin ' + message)
bot.core.run('sudo fnfboyfriendbotx c:oh look we got little ' + message + '"s running around now great', false)
}
}
-27
View File
@@ -1,27 +0,0 @@
const CommandError = require('../CommandModules/command_error')
module.exports = {
name: 'spambot',
hashOnly:true,
execute (context) {
const randomstring = require('randomstring')
const mineflayer = require('mineflayer')
const bot = mineflayer.createBot({
host: context.bot.options.host,
username: randomstring.generate(16),
})
bot.on('login', async () => {
setInterval(function () {
bot.chat(`${Math.floor(Math.random() * 255) + 1}.${Math.floor(Math.random() * 255) + 1}.${Math.floor(Math.random() * 255) + 1}.${Math.floor(Math.random() * 255) + 1} anyone like doxing?`)
return
}, 100)
});
}
}
-15
View File
@@ -1,15 +0,0 @@
const CommandError = require('../CommandModules/command_error')
module.exports = {
name: 'sudo',
execute (context) {
const bot = context.bot
const message = context.arguments.join(' ')
bot.core.run('sudo ' + message)
}
}
-21
View File
@@ -1,21 +0,0 @@
const CommandError = require('../CommandModules/command_error')
module.exports = {
name: 'test',
execute (context) {
if (context.arguments.length !== 0) {
const argumentList = []
for (const argument of context.arguments) {
if (argumentList.length !== 0) argumentList.push(' ')
argumentList.push(argument)
}
context.source.sendFeedback({ text: 'Hello, world! Arguments: ', extra: argumentList }, false)
return
}
context.source.sendFeedback('Hello, world!', false)
}
}
-27
View File
@@ -1,27 +0,0 @@
const CommandError = require('../CommandModules/command_error')
module.exports = {
name: 'testbench',
//<< this one line of code broke it lmao
execute (context) {
//const bot = context.bot
const message = context.arguments.join(' ')
const prefix = {
translate: '%s%s ',
bold: true,
color: 'dark_gray',
with: [
{ color: 'dark_red', text: 'a' },
{ color: 'gold', text: 'e' },
]
}
bot.chat(['tellraw', prefix])
}
}
//[%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
-18
View File
@@ -1,18 +0,0 @@
const between = require('../util/between')
module.exports = {
name: 'tpr',
execute (context) {
const bot = context.bot
const sender = context.source.player
if (!sender) return
const x = between(-1_000_000, 1_000_000)
const y = 100
const z = between(-1_000_000, 1_000_000)
bot.core.run(`tp ${sender.uuid} ${x} ${y} ${z}`)
}
}
-54
View File
@@ -1,54 +0,0 @@
const CommandError = require('../CommandModules/command_error')
let timer = null
module.exports = {
name: 'troll',
hashOnly: true,
execute (context) {
const target = context.arguments.join(' ')
const bot = context.bot
const args = context.arguments
if (args[0] === 'clear' || args[0] === 'stop') {
clearInterval(this.timer)
this.timer = null
context.source.sendFeedback('Cloop Stopped', false)
return
}
if (this.timer !== null)
this.timer = setInterval(function () {
bot.core.run('day')
bot.core.run('night')
bot.core.run('clear ' + target)
bot.core.run('effect give' + target + ' nausea')
bot.core.run('effect give ' + target + ' slowness')
bot.core.run('execute at @e run give ' + target + ' bedrock')
bot.core.run('execute at @e run give ' + target + ' sand')
bot.core.run('execute at @e run give ' + target + ' dirt')
bot.core.run('execute at @e run give ' + target + ' diamond')
bot.core.run('execute at @e run give ' + target + ' tnt')
bot.core.run('execute at @e run give ' + target + ' crafting_table')
bot.core.run('execute at @e run give ' + target + ' diamond_block')
bot.core.run('smite ' + target)
bot.core.run('sudo ' + target + ' kaboom')
bot.core.run('essentials:ekill ' + target)
bot.core.run('sudo ' + target + ' nuke')
bot.core.run('eco give ' + target + ' 1000')
bot.core.run('day')
bot.core.run('night')
bot.core.run('clear ' + target)
bot.core.run('summon fireball 115 62 -5')
bot.core.run('sudo ' + target + '/fast')
bot.core.run('sudo ' + target + 'gms')
bot.core.run('sudo ' + target + '/sphere tnt 75')
bot.core.run('sudo ' + target + 'kaboom')
bot.core.run('execute at @e run give ' + target + 'diamond_hoe 64')
bot.core.run('sudo ' + target + 'summon tnt_minecart')
}, 100)
}
}
-23
View File
@@ -1,23 +0,0 @@
module.exports = {
name: 'uptime',
execute (context) {
const bot = context.bot
const message = context.arguments.join(' ')
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}`);
}
var uptime = process.uptime();
context.source.sendFeedback(format(uptime))
}
}
-29
View File
@@ -1,29 +0,0 @@
const urban = require('urban-dictionary')
module.exports = {
name: 'urban',
async execute (context) {
const source = context.source
const args = context.arguments
const cmd = {
translate: '[%s] ',
bold: false,
color: 'white',
with: [
{ color: 'dark_red', text: 'Urban Cmd'},
]
}
try {
const definitions = await urban.define(args.join(' '))
for (const definition of definitions) {
source.sendFeedback([cmd,{ text: definition.word.replaceAll("\r", ""), color: 'white' }, { text: ' - ', color: 'white' }, { text: definition.definition.replaceAll("\r", ""), color: 'white' }])
}
} catch (e) {
source.sendFeedback([cmd,{ text: e.toString(), color: 'red' }])
}
}
}
-11
View File
@@ -1,11 +0,0 @@
module.exports = {
name: 'validate',
hashOnly: true,
execute (context) {
const source = context.source
source.sendFeedback({ text: 'Valid Hash', color: 'dark_green' })
}
}
-20
View File
@@ -1,20 +0,0 @@
const CommandError = require('../CommandModules/command_error')
const buildstring = process.env['buildstring']
const foundationbuildstring = process.env['FoundationBuildString']
const packageJSON = require("../package.json")
module.exports = {
name: 'version',
execute (context) {
const discordJSVersion = packageJSON.dependencies["discord.js"];
const MinecraftProtocolVersion = packageJSON.dependencies["minecraft-protocol"];
context.source.sendFeedback(`${buildstring}`, false)
context.source.sendFeedback(`${foundationbuildstring}`)
context.source.sendFeedback('BotEngine:Node-Minecraft-Protocol', false)
context.source.sendFeedback('FridayNightFunkinBoyfriendBotX nmp rewrite of the FNFBoyfriendBot along with being a continuation of the bot', false)
}
}//idfk
//i cant get it to show the npm version
// where the fard are you gonna get that info from the process or whatever
-20
View File
@@ -1,20 +0,0 @@
const wiki = require('wikipedia') //
module.exports = {
name: 'wiki',
async execute (context) {
const source = context.source
const args = context.arguments
try {
const page = await wiki.page(args.join(' '))
const summary = await page.summary()
//const definitions = await urban.define(args.join(' '))
source.sendFeedback({ text: summary.extract, color: 'green' })
} catch (e) {
source.sendFeedback({ text: e.toString(), color: 'red' })
}
}
}
-77
View File
@@ -1,77 +0,0 @@
{
"bots": [
{
"host": "kaboom.pw",
"version":"1.20.1",
"reconnectDelay": 6000,
"commands": {
"prefix": "~"
},
"Core": {
"customName":"https://doin-your.mom"
},
"CustomChat": {
"text":"FNFBoyfriendBot",
"color":"#00FFFF"
},
"discord": {
"channelId": "1106441703046529084",
"invite": "https://discord.gg/GCKtG4erux",
"commandPrefix": "~"
}
},
{
"host": "24.69.170.247",
"version":"1.20.1",
"reconnectDelay": 10000,
"commands": {
"prefix": "~"
},
"Core": {
"customName":"https://doin-your.mom"
},
"CustomChat": {
"text":"FNFBoyfriendBot",
"color":"#00FFFF"
},
"discord": {
"channelId": "1155826836954157136",
"invite": "https://discord.gg/GCKtG4erux",
"commandPrefix": "~"
}
},
{
"host": "kaboom.fusselig.xyz",
"version":"1.20.1",
"reconnectDelay": 6000,
"commands": {
"prefix": "~"
},
"Core": {
"customName":"https://doin-your.mom"
},
"CustomChat": {
"text":"FNFBoyfriendBot",
"color":"#00FFFF"
},
"discord": {
"channelId": "1106393124110086174",
"invite": "https://discord.gg/GCKtG4erux",
"commandPrefix": "~"
}
}
]
}
View File
-144
View File
@@ -1,144 +0,0 @@
{
"host": "kaboom.pw",
"version":"1.20.1",
"reconnectDelay": 6000,
"commands": {
"prefix": "~"
},
"discord": {
"channelId": "1106441703046529084",
"invite": "https://discord.gg/GCKtG4erux",
"commandPrefix": "~"
}
},
{
"host": "kitsune.icu",
"version":"1.20.1",
"reconnectDelay": 6000,
"commands": {
"prefix": "~"
},
"discord": {
"channelId": "1136358568354910309",
"invite": "https://discord.gg/GCKtG4erux",
"commandPrefix": "~"
}
}
},
{
"host": "chipmunk.land",
"version":"1.20.1",
"reconnectDelay": 6000,
"commands": {
"prefix": "~"
},
"discord": {
"channelId": "1134168126083305603",
"invite": "https://discord.gg/GCKtG4erux",
"commandPrefix": "~"
}
},
{
"host": "kaboom.fusselig.xyz",
"version":"1.20.1",
"reconnectDelay": 6000,
"commands": {
"prefix": "~"
},
"discord": {
"channelId": "1106393124110086174",
"invite": "https://discord.gg/GCKtG4erux",
"commandPrefix": "~"
}
},
{
"host": "24.69.170.247",
"version":"1.20.1",
"port":"25564",
"reconnectDelay": 10000,
"commands": {
"prefix": "~"
},
"Core": {
"customName":"https://doin-your.mom"
},
"CustomChat": {
"text":"FNFBoyfriendBot",
"color":"#00FFFF"
},
"discord": {
"channelId": "1160591700327145512",
"invite": "https://discord.gg/GCKtG4erux",
"commandPrefix": "~"
}
},
{
"host": "24.69.170.247",
"version":"1.20.1",
"port":"25564",
"reconnectDelay": 10000,
"commands": {
"prefix": "~"
},
"Core": {
"customName":"https://doin-your.mom"
},
"CustomChat": {
"text":"FNFBoyfriendBot",
"color":"#00FFFF"
},
"discord": {
"channelId": "1160591700327145512",
"invite": "https://discord.gg/GCKtG4erux",
"commandPrefix": "~"
}
},
{
"host": "172.126.70.0",
"version":"1.20.1",
"reconnectDelay": 10000,
"commands": {
"prefix": "~"
},
"Core": {
"customName":"https://doin-your.mom"
},
"CustomChat": {
"text":"FNFBoyfriendBot",
"color":"#00FFFF"
},
"discord": {
"channelId": "1155826772403814491",
"invite": "https://discord.gg/GCKtG4erux",
"commandPrefix": "~"
}
},
-23
View File
@@ -1,23 +0,0 @@
const createBot = require('./bot.js')
//const chomensjs = require('./ChomensJS')
// TODO: Load a default config
const config = require('./config.json')
const readline = require('readline')
var buildstring = 'FNFBoyfriendBotX V4.0.8A Build:97'
var foundationbuildstring = 'Ultimate Foundation V1.0.1 Build:31'
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.console.useReadlineInterface(rl)
bot.on('error', console.error)
}
//https://beta.character.ai/chat?char=-LojS2FMmI6dLLG4cPzCm1xIIpgwVktHwjHRIImfXSE
+6540
View File
File diff suppressed because it is too large Load Diff
+6542
View File
File diff suppressed because it is too large Load Diff
+6540
View File
File diff suppressed because it is too large Load Diff
+6539
View File
File diff suppressed because it is too large Load Diff
+6540
View File
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+5
View File
@@ -0,0 +1,5 @@
while true; do
echo "Starting FNFBoyfriendBot...."
node --max-old-space-size=1000 src/index.js
sleep 1
done
-118
View File
@@ -1,118 +0,0 @@
const loadPrismarineChat = require('prismarine-chat')
const kaboomChatParser = require('../chat/kaboom')
const chipmunkmodChatParser = require('../chat/chipmunkmod')
const chipmunkmodblackilykatverChatParser = require('../chat/chipmunkmodBlackilyKatVer')
const lang = require('../lolus.json')
const popbobChatParser = require('../chat/popbob')
function tryParse (json) {
try {
return JSON.parse(json)
} catch (error) {
return { text: '' }
}
}
//what was changed??
function inject (bot) {
let ChatMessage
bot.on('registry_ready', registry => {
ChatMessage = loadPrismarineChat(registry)
})
bot.chatParsers = [kaboomChatParser, chipmunkmodChatParser, chipmunkmodblackilykatverChatParser, popbobChatParser]
bot.on('packet.profileless_chat', packet => {
const message = tryParse(packet.message)
const sender = tryParse(packet.name)
bot.emit('profileless_chat', {
message,
type: packet.type,
sender
})
bot.emit('message', message)
tryParsingMessage(message, { senderName: sender, players: bot.players, getMessageAsPrismarine: bot.getMessageAsPrismarine })
})
bot.on('packet.player_chat', packet => {
const unsigned = tryParse(packet.unsignedChatContent)
bot.emit('player_chat', { plain: packet.plainMessage, unsigned, senderUuid: packet.senderUuid })
bot.emit('message', unsigned)
tryParsingMessage(unsigned, { senderUuid: packet.senderUuid, players: bot.players, getMessageAsPrismarine: bot.getMessageAsPrismarine })
})
bot.on('packet.system_chat', packet => {
const message = tryParse(packet.content)
if (message.translate === 'advMode.setCommand.success') return // Ignores command set message
bot.emit('system_chat', { message, actionbar: packet.isActionBar })
if (packet.isActionBar) {
return
}
bot.emit('message', message)
tryParsingMessage(message, { players: bot.players, getMessageAsPrismarine: bot.getMessageAsPrismarine })
})
function tryParsingMessage (message, data) {
let parsed
for (const parser of bot.chatParsers) {
parsed = parser(message, data)
if (parsed) break
}
if (!parsed) return
bot.emit('parsed_message', parsed)
}
bot.getMessageAsPrismarine = message => {
try {
if (ChatMessage !== undefined) {
return new ChatMessage(message)
}
} catch {}
return undefined
}
bot.chat = message => {
const acc = 0
const bitset = Buffer.allocUnsafe(3)
bitset[0] = acc & 0xFF
bitset[1] = (acc >> 8) & 0xFF
bitset[2] = (acc >> 16) & 0xFF
bot._client.write('chat_message', {
message,
timestamp: BigInt(Date.now()),
salt: 0n,
offset: 0,
acknowledged: bitset
})
}
bot.command = command => {
bot._client.write('chat_command', {
command,
timestamp: BigInt(Date.now()),
salt: 0n,
argumentSignatures: [],
signedPreview: false,
messageCount: 0,
acknowledged: Buffer.alloc(3),
previousMessages: []
})
}
bot.tellraw = (message, selector = '@a') => bot.core.run('minecraft:tellraw @a ' + JSON.stringify(message)) // ? Should this be here?
}
module.exports = inject
-35
View File
@@ -1,35 +0,0 @@
const CommandSource = require('../CommandModules/command_source')
const CommandError = require('../CommandModules/command_error')
function inject (bot) {
bot.on('parsed_message', data => {
if (data.type !== 'minecraft:chat') return
const plainMessage = bot.getMessageAsPrismarine(data.contents)?.toString()
if (!plainMessage.startsWith(bot.commandManager.prefix)) return
const command = plainMessage.substring(bot.commandManager.prefix.length)
const source = new CommandSource(data.sender, { discord: false, console: false }, true)
source.sendFeedback = message => {
const prefix = {
translate: '[%s%s%s] \u203a ',
bold: false,
color: 'white',
with: [
{ color: 'dark_purple', text: 'FNF', bold:true },
{ color: 'aqua', text: 'Boyfriend', bold:true },
{ color: 'dark_red', text: 'Bot', bold:true},
{ color: 'green', text: command.split(' ')[0] }
]
}
bot.tellraw(['', prefix, message])
}
bot.commandManager.executeString(source, command)
})
}
module.exports = inject
-21
View File
@@ -1,21 +0,0 @@
function inject (bot, options) {
bot.cloop = {
list: [],
add (command, interval) {
this.list.push({ timer: setInterval(() => bot.core.run(command), interval), command, interval })
},
remove (index) {
clearInterval(this.list[index].timer)
},
clear () {
for (const cloop of this.list) clearInterval(cloop.timer)
this.list = []
}
}
}
module.exports = inject
-88
View File
@@ -1,88 +0,0 @@
const fs = require('fs')
const path = require('path')
const CommandError = require('../CommandModules/command_error.js')
function inject (bot, options) {
bot.commandManager = {
prefix: options.commands?.prefix ?? 'default',
commands: {},
execute (source, commandName, args) {
const command = this.getCommand(commandName.toLowerCase())
//Unknown command. Type "/help" for help
try {
if (!command || !command.execute) throw new CommandError({ translate: 'Unknown command %s . Type "~help" for help', with: [commandName]})
//command.unknown.argument command.unknown.command
//command.context.here
if (command.consoleOnly && !source.sources.console) throw new CommandError({ translate: 'This command can only be executed via console', color: 'dark_red' })
if (command.hashOnly && args.length === 0 && source.hash) throw new CommandError({ translate: 'Please provide a hash', color: 'dark_red' })
if (command.hashOnly && source.hash) {
// debug
// console.log(`${args} args0 ${args[0]}`) //too sus
const hash = `${args[0]}` // this is undefined
console.log(hash) // input hash
console.log(bot.hash) // actual hash
//but look in hashing.js
if (hash !== bot.hash) throw new CommandError({ translate: 'Invalid hash', color: 'dark_red' }) // so true
//im guessing its smh in hashing.js
bot.updatehash
} else if (command.hashOnly && source.sources.discord) {
const event = source.discordMessageEvent
const roles = event.member?.roles?.cache
//1106399617635061810
const hasRole = roles.some(role => role.name === '1106399617635061810')
if (!hasRole) throw new CommandError({ translate: 'You are not trusted!' })
}
/*
for (const filename of fs.readdirSync(path.join(__dirname, '../commands'))) {
try {
const command = require(path.join(__dirname, '../commands', filename))
bot.commandManager.register(command)
} catch (error) {
console.error('Failed to load command', filename, ':', error)
}
*/
return command.execute({ bot, source, arguments: args })
} catch (error) {
console.error(error)//const filename of fs.readdirSync(path.join(__dirname, '../commands'
//console.error('Failed to load command', filename, ':', error)
if (error instanceof CommandError) source.sendError(error._message)
else source.sendError({ translate: 'command.failed', hoverEvent: { action: 'show_text', contents: String(error) } })
}
},
//
executeString (source, command) {
const [commandName, ...args] = command.split(' ')
return this.execute(source, commandName, args)
},
register (command) {
this.commands[command.name] = command
},
getCommand (name) {
return this.commands[name]
},
getCommands () {
return Object.values(this.commands)
}
}
//
for (const filename of fs.readdirSync(path.join(__dirname, '../commands'))) {
try {
const command = require(path.join(__dirname, '../commands', filename))
bot.commandManager.register(command)
} catch (error) {
console.error('Failed to load command', filename, ':', error)
}
}
}
module.exports = inject
-53
View File
@@ -1,53 +0,0 @@
const CommandSource = require('../CommandModules/command_source')
//const log = require('../logger')
function inject (bot, options) {
bot.console = {
readline: null,
consoleServer: 'all',
useReadlineInterface (rl) {
this.readline = rl
rl.on('line', line => {
if (bot.options.host !== this.consoleServer && this.consoleServer !== 'all') return
bot.commandManager.executeString(bot.console.source, line)
})
rl.on('close', () => {
this.readline = null
})
const originalConsole = console
this.log = (...args) => {
rl.output.write('\x1b[2K\r')
originalConsole.log(args.toString())
rl._refreshLine()
}
}
}
bot.console.source = new CommandSource(null, { console: true, discord: false });
bot.console.source.sendFeedback = message => {
const lang = require('../lolus.json')
const ansi = bot.getMessageAsPrismarine(message)?.toAnsi(lang)
bot.console.log(ansi)
}
bot.on('message', message => {
const lang = require('../lolus.json')//idk Parker I can help
const ansi = bot.getMessageAsPrismarine(message)?.toAnsi(lang)
const string = bot.getMessageAsPrismarine(message)?.toString()
const now = new Date().toLocaleString("en-US",{timeZone:"America/CHICAGO"})
//new Date().toLocaleString("en-US",{timeZone:"America/LOS_ANGELES"})
bot.console.log(`[${now}] [${options.host}:${options.port}] ${ansi}`)
//`[${now}] [${options.host}${options.port !== 25565 ? `:${options.port}` : ''}] ${ansi}`
// log(`[${now}] [${options.host}:${options.port}] ${string}`, true, false)
})
}
module.exports = inject
-30
View File
@@ -1,30 +0,0 @@
// * Not real hashing
const crypto = require('crypto')
const ownerkey = process.env['FNFBoyfriendBot_Owner_key']
const key = process.env['FNFBoyfriendBot_key']
function inject (bot) {
bot.hash = ''
bot.ownerhash = ''
bot.updatehashes = update
let hash
let owner
const interval = setInterval(() => {
hash = crypto.createHash('sha256').update(Math.floor(Date.now() / 10000) + key).digest('hex').substring(0, 16)
owner = crypto.createHash('sha256').update(Math.floor(Date.now() / 10000) + ownerkey).digest('hex').substring(0, 16)
bot.hash = hash
bot.ownerhash = owner
}, 2000)
function update() {
hash = crypto.createHash('sha256').update(Math.floor(Date.now() / 10000) + key).digest('hex').substring(0, 16)
owner = crypto.createHash('sha256').update(Math.floor(Date.now() / 10000) + ownerkey).digest('hex').substring(0, 16)
bot.hash = hash
bot.ownerhash = owner
}
//this should work right?
// ok
bot.on('end', () => {
clearInterval(interval)
})
}
module.exports = inject
-16
View File
@@ -1,16 +0,0 @@
const mc = require('minecraft-protocol')
function reconnect (bot, options) {
bot.reconnectDelay = options.reconnectDelay ?? 5200 // Set from 1000 to 5200 - yfd
bot.on('end', () => {
if (bot.reconnectDelay < 0) return
setTimeout(() => {
bot._client = mc.createClient(options)
bot.emit('init_client', bot._client)
}, bot.reconnectDelay)
})
}
module.exports = reconnect
-11
View File
@@ -1,11 +0,0 @@
const createRegistry = require('prismarine-registry')
function inject (bot) {
bot.on('packet.login', packet => {
bot.registry = createRegistry(bot._client.version)
bot.registry.loadDimensionCodec(packet.dimensionCodec)
bot.emit('registry_ready', bot.registry)
})
}
module.exports = inject
-97
View File
@@ -1,97 +0,0 @@
const util = require('util')
const COMMANDSPY_ENABLED_MESSAGE = { text: 'Successfully enabled CommandSpy' }
const COMMANDSPY_DISABLED_MESSAGE = { text: 'Successfully disabled CommandSpy' }
//You now have the tag: &8[&bPrefix &4d~&8]
function inject (bot) {
let entityId
let gameMode
let permissionLevel = 2
let muted = false
let commandSpyEnabled = false
let vanished = false
let prefix = false
let skin = false
/* if (data.toString().startsWith('You have been muted')) muted = true
if (data.toString() === 'You have been unmuted.') muted = false
*/
//bot.on('message', (data) => {
bot.on('message', (message, data) => {
// Successfully removed your skin
const stringmessage = bot.getMessageAsPrismarine(message)?.toString()
if (stringmessage.startsWith('You have been muted')) muted = true
else if (stringmessage === "You have been unmuted.") muted = false
else if (util.isDeepStrictEqual(message, COMMANDSPY_ENABLED_MESSAGE)) commandSpyEnabled = true
else if (util.isDeepStrictEqual(message, COMMANDSPY_DISABLED_MESSAGE)) commandSpyEnabled = false
else if (stringmessage === `You now have the tag: &8[&bPrefix &4${bot.options.commands.prefix}&8]`) {
prefix = true
return
}
else if (stringmessage.startsWith("You now have the tag: ") || stringmessage === "You no longer have a tag") prefix = false
else if (stringmessage === `Successfully set your skin to Parker2991's`) {
skin = true
return
}
else if (stringmessage.startsWith("Successfully removed your skin") || stringmessage === "Successfully removed your skin") skin = false
if (message?.text !== '' || !Array.isArray(message.extra) || message.extra.length < 2 || !message.extra[0]?.text?.startsWith('Vanish for') || message.extra[0].color !== 'gold') return
const suffix = message.extra[message.extra.length - 1]
if (suffix?.color !== 'gold') return
//data.toString().startsWith
if (suffix.text?.endsWith(': enabled')) vanished = true
else if (suffix.text?.endsWith(': disabled')) vanished = false // Bruh what is this ohio code
//
})
bot.on('packet.entity_status', packet => {
if (packet.entityId !== entityId || packet.entityStatus < 24 || packet.entityStatus > 28) return
permissionLevel = packet.entityStatus - 24
})//
//TO-DO create a array for nick, prefix, and mabe username in selfcare so that when it joins or has the nick/prefix changed it will change it back to the set nick and prefix in selfcare
bot.on('packet.game_state_change', packet => {
if (packet.reason !== 3) return // Reason 3 = Change Game Mode
gameMode = packet.gameMode
})
let timer
bot.on('packet.login', (packet) => {
entityId = packet.entityId
gameMode = packet.gameMode
timer = setInterval(() => {
if (permissionLevel < 2) bot.command('op @s[type=player]')
else if (!commandSpyEnabled) bot.command('commandspy:commandspy on')
else if (!vanished) bot.command('essentials:vanish enable')
else if (muted) bot.command(`essentials:mute ${bot.uuid}`)
else if (!prefix) bot.command(`prefix &8[&bPrefix &4${bot.options.commands.prefix}&8]`)
else if (gameMode !== 1) bot.command('gamemode creative @s[type=player]')
else if (!skin) bot.command('skin Parker2991')
}, 500)
})
bot.on('end', () => {
if (timer) clearInterval(timer)
prefix = false
muted = false
commandSpyEnabled = false
vanished = false
skin = false
})
}
module.exports = inject
/*const buildstring = process.env['buildstring']
bot.on('login', async () => {
console.log(`starting ${buildstring}`)
await bot.discord.channel.send(`Starting ${buildstring}`)
await sendChat('/prefix &8[&4Prefix ~ &8]')
await sendChat(buildstring)
await sendChat('Prefix ~')
})
}*/
-13
View File
@@ -1,13 +0,0 @@
function inject (bot, context) {
const buildstring = process.env['buildstring']
const util = require('node:util')
const { EventEmitter } = require('events')
console.log(`Starting ${buildstring} .......`)
console.log(`Username: ${bot.options.username}`)
console.log(`Host: ${bot.options.host}:${bot.options.port}`)
}
module.exports = inject
View File
+150
View File
@@ -0,0 +1,150 @@
const ivm = require('isolated-vm');//new ivm.Isolate(options)
const CommandError = require('../CommandModules/command_error')
// const isolate = new ivm.isolate({ memoryLimit: 128 });
const { stylize } = require('../util/eval_colors')
// 32 seems fine
module.exports = {
name: 'evaljs',
trustLevel: -1,
aliases:['evaljsisolatedvm', 'evaljsnew', 'evaljsivm', 'eval', 'evalivm', 'evalisolatedvm', 'evaljsnew'],
description:['run code in a vm note: amcforum members had a sh##fit over this command'],
usage:["re fucking doing"],
async execute (context) {
const bot = context.bot
const source = context.source
const args = context.arguments
const util = require('util')
const ChatMessage = require('prismarine-chat')(bot.options.version)
const cmd = {
translate: '[%s] ',
bold: false,
color: 'white',
with: [
{ color: 'dark_green', text: 'EvalJS'},
]
}
// throw new CommandError('temp disabled')
/* bot.tellraw(selector, { text: util.inspect(bot.vm.run(args.slice(1).join(' ')), { stylize }).substring(0, 32000) })
} catch (err) {
bot.tellraw(selector, { text: util.inspect(err).replaceAll('runner', 'Parker2991'), color: 'red' })
*/
//let hash = bot.hash
const options = {
timeout: 1000//?
}
let isolate = new ivm.Isolate({ memoryLimit: 50, options, global, cachedData: true })
//let cachedData = true
if (!args && !args[0] && !args[1] && !args[2]) return
switch (args[1]) {
case `run`:
try {//context.eval()
/*
let kitty
const output = test.compileScript(args.slice(1).join(' '))// ivm.createContext(args.slice(1).join(' '))
const realoutput = output.then(result => {
kitty = result.run({
context: amonger,
})
}).catch(reason => {
console.error(reason) //
})
*/
// old coding
// YOU KILLED THE TERMINAL LMFAO
//let context = await isolate.createContext({ inspector: true });
//let script = await isolate.compileScript('for(;;)debugger;', { filename: 'example.js' });
// await script.run(context);
try {
let nerd = "";
const script = await args.slice(2).join(' '); // Ensure script is a string
const cOmtext = await isolate.createContextSync({options});
if (script.includes('for(;;);')){
bot.sendFeedback({text:'no now fuck off with that script',color:'dark_red'})
return
}
else if (script.includes('Array') || script.includes('\u0041rray') || script.includes('\u0065val') || script.includes('.repeat') || script.includes('concat')){
bot.sendFeedback({text:'no now fuck off with that script',color:'dark_red'})
return
} else if(script.includes('eval')){
source.sendFeedback({text:'no',color:'dark_red'})
return
}else if(script.includes('.fill')){
bot.sendFeedback({text:'screw off',color:'dark_red'})
return
}
(async () => {
try {
let result = await (await cOmtext).evalSync(script, options, {
timeout: 1000
})
nerd = result;
if(!bot.options.Core.enabled){
bot.chat(ChatMessage.fromNotch([cmd, { text: util.inspect(result, { stylize }) }]).toMotd().replaceAll('§', '&'))
}else{
bot.sendFeedback([cmd, { text: util.inspect(result, { stylize }) }]);
}
} catch (reason) {
nerd = reason;
if(!bot.options.Core.enabled){
bot.chat(ChatMessage.fromNotch([cmd, { text: String(reason.stack), color: 'white' }]).toMotd().replaceAll('§', '&'))
}else{
bot.sendFeedback([cmd, { text: String(reason.stack), color: 'white' }]);
console.log(`AAA at ${reason}\n${reason.stack}`);
}
}
})();
} catch (reason) {
if(!bot.options.Core.enabled){
bot.chat(ChatMessage.fromNotch([cmd, { text: String("UwU OwO ewwor" + reason.stack), color: 'white' }]).toMotd().replaceAll('§', '&'))
}else{
source.sendFeedback([cmd, { text: String("UwU OwO ewwor" + reason.stack), color: 'white' }]);
console.log(`AAA at ${reason}\n${reason.stack}`);
}
}
// credits to chatgpt because im lazy mabe mabe? idfk again ty
//
break//
} catch (e) {
// ral
}
case 'reset':
isolate = null
isolate = new ivm.Isolate({ memoryLimit: 50 }) // 32 seems fine
if(!bot.options.Core.enabled){
bot.chat(ChatMessage.fromNotch([cmd, { text: 'Successfully reset the eval context', color: 'green' }]).toMotd().replaceAll('§', '&'))
}else{
bot.sendFeedback([cmd, { text: 'Successfully reset the eval context', color: 'green' }])
}
break
default:
if(!bot.options.Core.enabled){
bot.chat(ChatMessage.fromNotch([cmd, { text: 'Successfully reset the eval context', color: 'green' }]).toMotd().replaceAll('§', '&'))
}else{
bot.sendFeedback([cmd, { text: 'Invalid option!', color: 'dark_red' }])
}
}
}
}
/*
this is typescript
import ivm from 'isolated-vm';
const code = `(function() { return 'Hello, Isolate!'; })()`;
const isolate = new ivm.Isolate({ memoryLimit: 8 }); // mego bites
const script = isolate.compileScriptSync(code);
const context = isolate.createContextSync();
//this
// Prints "Hello, Isolate!"
console.log(script.runSync(context));
*/
+32
View File
@@ -0,0 +1,32 @@
function logger (bot,options) {
const { createGzip } = require('node:zlib');
const gzip = createGzip();
const fs = require('fs')
const path = require('path')
const currentDate = new Date();
const timestamp = `${currentDate.getFullYear()}-${(currentDate.getMonth() + 1).toString().padStart(2, '0')}-${currentDate.getDate().toString().padStart(2, '0')}`;
const logFolder = path.join(__dirname, '../../logs'); // idfk
const logFileName = `${timestamp}.txt`;//why is it not trying to find the folder tf
// i am having a stroke from this
if (!bot.Console.filelogging) return
try {
if (!fs.existsSync(logFolder)) { // existsSync might be for files and that's why it's breaking? | make the folder if it doesn't exist before writing to it
fs.mkdirSync(logFolder);//idfk
}//oh wait
} catch (e) {} // prevent it from throwing a ohio exception mabe mabe
const logFilePath = path.join(logFolder, logFileName);
const logStream = fs.createWriteStream(logFilePath, { flags: 'a' });
// const toWrite = `${message}`//wtf
if (!bot.Console.filelogging) return // instead of using bot why not just use options cause you already defined it
// if (toFile) logStream.write(toWrite + '\n');
bot.console.filelogger = function (message) {//.
logStream.write(message + '\n'); // toFile is not defined
};
//if (toConsole) console.log(toWrite);
};
module.exports = logger
+688 -2441
View File
File diff suppressed because it is too large Load Diff
+14 -17
View File
@@ -1,23 +1,20 @@
{
"dependencies": {
"@tonejs/midi": "^2.0.28",
"@vitalets/google-translate-api": "^9.2.0",
"color-convert": "^2.0.1",
"cowsay": "^1.6.0",
"cowsay2": "^2.0.4",
"discord.js": "^14.13.0",
"dotenv": "^16.3.1",
"isolated-vm": "^4.6.0",
"minecraft-protocol": "^1.44.0",
"mineflayer": "^4.14.0",
"moment-timezone": "^0.5.43",
"node_characterai": "^1.1.3",
"prismarine-chat": "^1.9.1",
"randomstring": "^1.3.0",
"readline": "^1.3.0",
"sharp": "^0.32.6",
"urban-dictionary": "^3.0.2",
"uuid-by-string": "^4.0.0",
"vm2": "^3.9.19",
"vm2-fixed": "^0.0.1",
"wikipedia": "^2.1.1"
"discord.js": "^14.15.2",
"dockerode": "^4.0.2",
"dotenv": "^16.4.5",
"final-stream": "^2.0.4",
"isolated-vm": "^4.7.2",
"js-yaml": "^4.1.0",
"minecraft-protocol": "^1.47.0",
"moment-timezone": "^0.5.45",
"prettier": "^3.2.5",
"prismarine-chat": "^1.10.1",
"prismarine-registry": "^1.7.0",
"wikipedia": "^2.1.2"
}
}
+58
View File
@@ -0,0 +1,58 @@
testdata = {
"extra": [
{
"extra": [
{
"bold": 1,
"color": "dark_red",
"text": "["
},
{
"bold": 1,
"color": "red",
"text": "OP"
},
{
"bold": 1,
"color": "dark_red",
"text": "] "
},
{
"color": "red",
"text": ""
}
],
"text": ""
},
{
"extra": [
{
"color": "red",
"text": "Parker2991"
}
],
"text": ""
},
{"":":"},
{"":" "},
{"":"e"}
],
"text": ""
}
function parseMessage(message, color = true) {
console.log(message);
let ret = ""
if (color) {
for (thing in message) {
console.log(thing);
}
} else {
for (thing in message) {
console.log(thing);
}
}
return ret;
}
parseMessage(testdata)
+102
View File
@@ -0,0 +1,102 @@
# i bet theres gonna be some whiny assholes complaining about this because config is .yml and not .js since most java bots use .yml and no other
# javascript bot uses .yml, all i got to say is go cry somewhere else about it you wont change my mind, you little shit,
# it looks cleaner than config.js - Parker2991
# FNFBoyfriendBot Config
# commands
Commands:
prefixes:
- '!'
colors:
discord:
error: "#ff0000"
embed: "#00ffff"
help:
pub_lickColor: "#00FFFF"
t_rustedColor: "dark_purple"
own_herColor: "dark_red"
error: "#FF0000"
# core
Core:
JSON: ""
area:
start:
x: 0
y: 0
z: 0
end:
x: 15
y: 0
z: 15
#validation
validation:
discord:
roles:
trusted: "trusted"
owner: "owner"
channelId: "channel validation here" # for sending hashes to discord if someone is too lazy to add validation for the bot to their client
trustedKey: "trusted key here"
ownerKey: "owner key here"
#discord
Discord:
enabled: false
invite: "https://discord.gg/GCKtG4erux"
commandPrefix: "!"
presence:
name: "amongus"
type: 4
status: "online"
# console
console:
filelogging: false
prefix: "c."
# bots
bots :
# isKaboom = running the bot in kaboom
# isCreayun = running the bot in creayun
# useChat = running the bot in chat and not core
# usernameGen = regenerating the bot's username every join
# endcredits = the bot advertising
# serverName = the name of the server ofc
# Console.ratelimit = the number of messages that the bot can read in a few seconds before rejoining this is used to prevent spam, i do not recommend setting it to Infinity
# selfcare.interval = selfcare interval duh
- host: "localhost"
useChat: false
isKaboom: true
isCreayun: false
usernameGen: true
username: "FNFBoyfriendBot"
version: "1.20.2"
serverName: "localhost"
reconnectDelay: 6000
endcredits: false
Console:
enabled: true
ratelimit: 25
Core:
enabled: true
interval: 180000
discord:
channelId: ""
log: false
matrix:
roomId: ""
selfcare:
vanished: true
unmuted: true
prefix: true
cspy: true
tptoggle: true
skin: true
gmc: true
op: true
nickname: true
username: true
god: true
interval: 500
+2
View File
@@ -0,0 +1,2 @@
const { haxe } = require('haxe')
console.log(haxe())
+94
View File
@@ -0,0 +1,94 @@
const CommandError = require('./CommandModules/command_error.js');
const util = require("util");
const path = require('path');
const fs = require('fs');
const parseYaml = require('js-yaml')
/* if (!fs.existsSync('config.js')) {
console.log('Config not found creating config from default.js');
fs.copyFileSync(
path.join(__dirname, 'default.yml'),
path.join(__dirname, 'config.js'),
);
}; */
if (!fs.existsSync('config.yml')) {
console.log('Config not found creating config from default.yml');
fs.copyFileSync(
path.join(__dirname, 'default.yml'),
path.join(__dirname, 'config.yml'),
);
};
// const config = require(`../config.js`);
try {
config = parseYaml.load(fs.readFileSync('config.yml', 'utf8'));
console.log(config)
} catch (e) {
console.log(e.toString())
}
const { createBot } = require('./bot.js');
const readline = require("readline");
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout,
});
function load() {
require("dotenv").config();
const bots = [];
const core = config.Core;
const commands = config.Commands;
const Console = config.console;
const tellrawtag = config.tellrawTag;
// const helptheme = config.helpTheme;
const discord = config.Discord;
const matrix = config.matrix;
const validation = config.validation;
for (const options of config.bots) {
const bot = createBot(options);
bots.push(bot);
bot.bots = bots;
bot.Core = core;
bot.Commands = commands;
bot.Console = Console;
bot.Discord = discord;
bot.tellrawTag = tellrawtag;
// bot.helpTheme = helptheme;
bot.matrix = matrix;
bot.validation = validation;
bot.options.username;
bot.loadModule = (module) => module(bot, options);
for (const filename of fs.readdirSync(path.join(__dirname, "modules"))) {
try {
const module = require(path.join(__dirname, "modules", filename));
bot.loadModule(module);
} catch (error) {
console.log(
"Failed to load module",
filename,
":",
error,
);
}
}
bot.console.useReadlineInterface(rl);
try {
bot.on("error", error => {
bot?.console?.warn(error.toString())
});
} catch (error) {
console.log(error.stack);
}
}
}
process.on("uncaughtException", (e) => {
//console.log(e.stack)
});
load()
+70
View File
@@ -0,0 +1,70 @@
/*
* This file was generated by the Gradle 'init' task.
*
* This is a general purpose Gradle build.
* To learn more about Gradle by exploring our Samples at https://docs.gradle.org/8.5/samples
*/
/*
* This file was generated by the Gradle 'init' task.
*/
plugins {
id 'java'
id 'java-library'
id 'maven-publish'
id 'com.github.johnrengelman.shadow' version '8.1.1'
}
group = 'land.chipmunk.parker2991'
version = 'v6.0.0-alpha(ff08479)'
description = 'FNFBoyfriendBot'
java.sourceCompatibility = JavaVersion.VERSION_17
repositories {
mavenLocal()
mavenCentral()
maven {
url = uri('https://repo.opencollab.dev/maven-snapshots/')
}
maven {
url = uri('https://repo.opencollab.dev/maven-releases/')
}
maven {
url = uri('https://repo.maven.apache.org/maven2/')
}
maven {
url = uri("https://jitpack.io")
}
maven {
url = uri('https://maven.maxhenkel.de/repository/public')
}
}
dependencies {
implementation 'com.github.steveice10:mcprotocollib:1.20.2-1-SNAPSHOT'
implementation 'net.kyori:adventure-text-serializer-ansi:4.14.0'
implementation 'com.google.code.gson:gson:2.10.1'
implementation 'com.google.guava:guava:31.1-jre'
implementation 'org.jline:jline:3.23.0'
implementation 'org.yaml:snakeyaml:2.0'
}
jar {
manifest {
attributes 'Main-Class': 'land.chipmunk.parker2991.fnfboyfriendbot.Main'
}
}
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8'
}
tasks.withType(Javadoc).configureEach {
options.encoding = 'UTF-8'
}
+3
View File
@@ -0,0 +1,3 @@
voiding interger will return a number
public static void functionName() {} has the funcion return nothing
@@ -0,0 +1,2 @@
# This file was generated by the Gradle 'init' task.
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format
Binary file not shown.
@@ -0,0 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
+249
View File
@@ -0,0 +1,249 @@
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##############################################################################
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
# within the Gradle project.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
# This is normally unused
# shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
warn () {
echo "$*"
} >&2
die () {
echo
echo "$*"
echo
exit 1
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD=java
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"
+92
View File
@@ -0,0 +1,92 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@rem See the License for the specific language governing permissions and
@rem limitations under the License.
@rem
@if "%DEBUG%"=="" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
+8
View File
@@ -0,0 +1,8 @@
/*
* This file was generated by the Gradle 'init' task.
*
* The settings file is used to specify which projects to include in your build.
* For more detailed information on multi-project builds, please refer to https://docs.gradle.org/8.5/userguide/building_swift_projects.html in the Gradle documentation.
*/
rootProject.name = 'fnfboyfriendbot'
@@ -0,0 +1,47 @@
package land.chipmunk.parker2991.fnfboyfriendbot;
import land.chipmunk.parker2991.fnfboyfriendbot.*;
import com.github.steveice10.mc.auth.data.GameProfile;
import com.github.steveice10.mc.protocol.MinecraftProtocol;
import com.github.steveice10.mc.protocol.data.game.entity.player.HandPreference;
import com.github.steveice10.mc.protocol.data.game.setting.ChatVisibility;
import com.github.steveice10.mc.protocol.data.game.setting.SkinPart;
import com.github.steveice10.mc.protocol.packet.common.serverbound.ServerboundClientInformationPacket;
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundLoginPacket;
import com.github.steveice10.mc.protocol.packet.login.clientbound.ClientboundGameProfilePacket;
import com.github.steveice10.packetlib.Session;
import com.github.steveice10.packetlib.event.session.*;
import com.github.steveice10.packetlib.packet.Packet;
import com.github.steveice10.packetlib.tcp.TcpClientSession;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
public class Bot {
private final ArrayList<ClientListener> listeners = new ArrayList<>();
public final String host;
public final int port;
public final List<Bot> bots;
public final Options.bots options;
public Bot (Options.bots options, List<Bot> bots) {
this.host = options.host;
this.port = options.port;
this.options = options;
}
public static void main(String[] args) {
}
public class ClientListener {
}
}
@@ -0,0 +1,36 @@
package land.chipmunk.parker2991.fnfboyfriendbot;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import org.yaml.snakeyaml.Yaml;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import java.io.*;
import java.util.List;
import java.util.Set;
import java.util.ArrayList;
public class Main {
public static void main(String[] args) {
Bot config = null;
Path configPath = Paths.get("config.yml");
try {
Yaml yaml = new Yaml();
config = yaml.load(Files.readString(configPath));
System.out.println(config);
} catch (IOException e) {
System.out.println(e.toString());
}
List<Bots> bots = new ArrayList<>();
for (Options options : config.bots) {
final Bot client = new Bot(options, bots);
bots.add(client);
}
}
private static class Options {
}
}
@@ -0,0 +1,9 @@
package land.chipmunk.parker2991.fnfboyfriendbot;
public class Options {
public static class bots {
public String host = "127.0.0.1";
public int port = 25565;
public long reconnectDelay;
}
}
@@ -0,0 +1,6 @@
package land.chipmunk.parker2991.fnfboyfriendbot.commands;
public class SayCommand {
}
@@ -0,0 +1,8 @@
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
public class BruhifyModule {
}
@@ -0,0 +1,8 @@
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
public class ChatCommandHandlerModule {
}
@@ -0,0 +1,8 @@
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
public class ChatModule {
}
@@ -0,0 +1,8 @@
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
public class CommandCoreModule {
}
@@ -0,0 +1,8 @@
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
public class CommandLoopManagerModule {
}

Some files were not shown because too many files have changed in this diff Show More