mirror of
https://code.chipmunk.land/Parker2991/NitoriBot/
synced 2026-11-29 21:55:38 -05:00
Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4aa3599b5d | ||
|
|
1e9fb94e1d |
@@ -1,80 +0,0 @@
|
||||
beta 0.1 - 0.2 0.5 release 2022 (first release)
|
||||
ParkerBot/DEMONBOT/Woomybot/Boyfriend
|
||||
ehh nothing much just the release of the betas
|
||||
--------------------------------------
|
||||
beta 1.0 release 1/25/23 codename: in console test.
|
||||
original commands:!cloop bcraw,!cloop sudo,!troll,!say,!op (broke),!deop (broke), !gms (broke),!freeze,!icu <--- these commands no longer can be used in game but in console for beta 1.0
|
||||
commands added: fake kick,ban,kick,crashserver,stop,gmc,greetin,test(broken idk),bypass,entity spam(broken idk),gms(broke),stop,tntspam (broke idk),prefix (not tested yet),annoy (broke results in a complete server crash keeping ayunboom down for 3 to 5 hours),freeze(i dont even know what this do since i cant do !freeze),crashserver,troll(more destructive),trol(more destructive),icu(broke idk),say,sudo,cloop
|
||||
-------------------------------------
|
||||
1.0 release 1/26/23 1:47am codename:
|
||||
FNFBoyfriendBot.
|
||||
commands added: BOOM,deop,troll and trol(added extra code to both commands),kaboom,serverdeop,
|
||||
commands fixed:tp,gms,annoy(attemps to crash the server but not as bad as it was)
|
||||
commands untested:prefix
|
||||
command Broke:icu,freeze,tntspam,entityspam,tntspam?
|
||||
changed name to &b &lFNFBoyfriendBot may change later idk
|
||||
-------------------------------------
|
||||
1.0 revision 1 release 1/26/23 2:00pm
|
||||
codename revision 1.
|
||||
reworked the kaboom command and fixed the description commands but thats about it. also reworked the greeting command
|
||||
--------------------------------------
|
||||
1.1 release 1/28/23 1:51
|
||||
nothing much just added extra stuff to the troll, trol and that is about it
|
||||
-------------------------------------
|
||||
1.2 release 1/30/32 no codename
|
||||
for ppl me making me really mad -.- got released early
|
||||
--------------------------------------
|
||||
|
||||
|
||||
2.0 2/07/23 8:01pm codename: Major
|
||||
added DREAMSTANALERT,technoblade,GODSWORD,KFC,MYLEG,OHHAIL,altcrash,MyHead
|
||||
Reworked tntspam,entityspam,soundbreaker
|
||||
added Spim to the whitelist of the bot
|
||||
released too early than it was planned gonna be released due do the code almost leaked it had to be released early
|
||||
--------------------------------------
|
||||
|
||||
|
||||
2.1 release 2/11/23 5:30pm
|
||||
added: refillcore(had early prototypes of this was original), vanish,deop,cloopdeop,mute,cloopmute
|
||||
reworked: op (supposed to already op the bot but didnt work until this release) and reworked gmc (same problem with op)
|
||||
(had early prototypes of vanish,refillcore,gmc,and op but these were original gonna be automatic but after alot of attempts i said screw it and added 2 commands refillcore, and vanish reworked gmc and op and got them working finally) removed Spim because come to find out he couldnt be trusted
|
||||
--------------------------------------
|
||||
2.2 release 2/20/23 4:21pm central time
|
||||
bug fixes
|
||||
added ckill(added back after trial and error),serversuicidal
|
||||
changed username of the bot from hex code to FNFBoyfriendBot because hex code for the username was confusing as it changes everytime
|
||||
---------------------------------------
|
||||
3.0 Beta codename: blue-balled corruption
|
||||
was canceled due to ayunboom being rewriten and renamed to creayun barely usable on there because commands blocks are disabled which i created a bot for that server that has no command blocks https://replit.com/@Parker2991/FNFBoyfriendbotcreayun-bot-final-build#index.js just finished the final build of that bot due to chip announcing that he may make a kaboom clone yk what 1.5.2 and 1.8 support but anyway onto what is in the 3.0 beta well the beta for right now
|
||||
commands added:discord,version,online,list,iownyou,endmysuffering,wafflehouse,whopper,bcraw,destroycore
|
||||
Notes:the original say command was reworked into talking in chat without bcraw and command blocks which the bcraw chatting code is still in the bot but was reworked into the bcraw commmand. maybe some commands removed? i dont know yet edit there is 2 commands removed
|
||||
commands removed:tpe and serverdeop???
|
||||
reworked commands :say command for right now
|
||||
relay chat mabe will be added as a seperate repl i dont know yet possible would need a whole code rewrite for relay chat
|
||||
-----------------------------------------
|
||||
3.0 full release CodeName:Sky Remanifested
|
||||
the full release of 3.0 the rewrite has been pushed back to 4.0 due to 3.0 already pass its release date and the code i had on hand was done but the rewrite wasnt done
|
||||
Added: SelfCare
|
||||
Made during development:Relay chat prototypes for several servers
|
||||
---------------------
|
||||
3.0.5 release
|
||||
Bug fixes
|
||||
-----------
|
||||
3.0.9
|
||||
commands added:Help(finally added after about a year),consolelog(added cuz yes),cloopconsolelog(added cuz yes)
|
||||
-------------------
|
||||
4.0 beta Codename:FNFBoyfriendBot Ultimate
|
||||
all of the command removed and or rewriten from version 3.0.9
|
||||
Commands added or rewriten:ban,buyrealminecraft,cloop,discord,echo,errortest,freeze,help,icu,info,kick,bots,skids,romncitrash,say,selfdestruct,serversuicidal,sudo,test,trol,troll
|
||||
(note that this is different and is not CommandModules)Modules Added:discord,chat,chat_command_handler,command_manager,position,registry,reconnect,command_core
|
||||
CustomChats added:kaboom(for normal chat)
|
||||
(note that this is different and is not Modules)CommandModules Added:command_error,Command_source
|
||||
a beta release for rn
|
||||
-----------------------------
|
||||
4.0 Alpha Codename:FNFBoyfriendBot Ulitmate
|
||||
Commands added: calculator,ckill,evaljs,urban,crash,cloopcrash,core,list,ping,netmsg,skin,tpr
|
||||
Commands Removed:Buyrealminecraft
|
||||
(note that this is different and is not CommandModules)Modules Added:op selfcare,gmc selfcare,vanish selfcare,cspy selfcare,console
|
||||
(note that this is different and is not Modules)CustomChats Added:u2O3a(for custom chat)
|
||||
added util with between(for urban) eval_colors(for evaljs)
|
||||
----------------------------------
|
||||
@@ -1,8 +1,9 @@
|
||||
class CommandSource {
|
||||
constructor (player, sources, hash = false, discordMessageEvent = null) {
|
||||
constructor (player, sources, hash, owner = false, discordMessageEvent = null) {
|
||||
this.player = player
|
||||
this.sources = sources
|
||||
this.hash = hash
|
||||
this.owner = owner
|
||||
this.discordMessageEvent = discordMessageEvent
|
||||
}
|
||||
|
||||
|
||||
@@ -1,459 +0,0 @@
|
||||
const mineflayer = require('mineflayer')
|
||||
var server = '<Server IP>'
|
||||
|
||||
|
||||
|
||||
|
||||
const randomstring = require('randomstring');
|
||||
const bot = mineflayer.createBot({
|
||||
host: server,
|
||||
port: 25565,
|
||||
username: randomstring.generate(8),
|
||||
version: 1.16,
|
||||
})
|
||||
|
||||
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
|
||||
)
|
||||
}
|
||||
|
||||
//variables
|
||||
var prefix = '<Prefix Here>';
|
||||
var consoleprefix = '<Console Prefix Here>';
|
||||
|
||||
function randomchar() {
|
||||
const crypto = require("crypto");
|
||||
var hash = crypto.createHash("md5");
|
||||
var randomBytes = crypto.randomBytes(16);
|
||||
hash.update(randomBytes);
|
||||
var hashi = hash.digest(Math.round(Math.random()) ? "hex" : "Base64");
|
||||
|
||||
return hashi.substring(0, 16);
|
||||
}
|
||||
|
||||
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 });
|
||||
}
|
||||
bot.on('login', async () => { // time in ms
|
||||
|
||||
|
||||
|
||||
|
||||
await sendChat('/c')
|
||||
|
||||
|
||||
await sendChat('/night')
|
||||
await sendChat('/gamerule doMobSpawning false')
|
||||
await sendChat('/worldborder set 10000000')
|
||||
await sendChat('/de')
|
||||
await sendChat('/online')
|
||||
await sendChat('/cspy on')
|
||||
|
||||
|
||||
await sendChat('')
|
||||
await sendChat(`/fill ${Math.floor(bot.entity.position.x)} 0 ${Math.floor(bot.entity.position.z)} ${Math.floor(bot.entity.position.x) - 15} 2 ${Math.floor(bot.entity.position.z - 15)} command_block replace`);
|
||||
|
||||
|
||||
|
||||
})
|
||||
|
||||
const cmd = require('mineflayer-cmd').plugin
|
||||
|
||||
cmd.allowConsoleInput = true // Optional config argument
|
||||
bot.loadPlugin(cmd)
|
||||
//kill command function
|
||||
function killCommand(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(' ')
|
||||
if (sender == '<Username Here>') {
|
||||
runInCore('bcraw ' + prefix + 'Kill Cloop Executed')
|
||||
setInterval(function() { runInCore('ekill ' + message), 1 })
|
||||
resolve()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function freezeCommand(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(' ')
|
||||
if (sender == '<Username Here>') {
|
||||
runInCore('bcraw ' + prefix + + ' ' + message + ' Is Frozen')
|
||||
setInterval(function() { runInCore('tp ' + message + ' ' + message), 1 })
|
||||
|
||||
resolve()
|
||||
}
|
||||
})
|
||||
}
|
||||
function deopCommand(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(' ')
|
||||
if (sender == '<Username Here>') {
|
||||
runInCore('bcraw ' + prefix + 'Deop Cloop Executed')
|
||||
setInterval(function() { runInCore('execute run deop ' + message), 1 })
|
||||
resolve()
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
function deopallCommand(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(' ')
|
||||
if (sender == '<Username Here>') {
|
||||
runInCore('bcraw ' + prefix + 'Deop Cloop Executed')
|
||||
setInterval(function() { runInCore('deop @a'), 1 })
|
||||
setInterval(function() { runInCore('op @s[type=player]'), 1 })
|
||||
|
||||
resolve()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function survivalCommand(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(' ')
|
||||
if (sender == '<Username Here>') {
|
||||
runInCore('bcraw ' + prefix + 'Gamemode Survival For All')
|
||||
runInCore('execute at @a run gamemode survival @a')
|
||||
resolve()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function helpCommand(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(' ')
|
||||
if (sender == '<Username Here>') {
|
||||
runInCore('bcraw ' + prefix + ' !ckill <player> to spam kill any player ')
|
||||
runInCore('bcraw ' + prefix + ' !trol <player> to abuse a player ingame')
|
||||
runInCore('bcraw ' + prefix + ' !deop <player> to deop a player forever')
|
||||
runInCore('bcraw ' + prefix + ' !icu <player> spam tp a player to you(control them)')
|
||||
runInCore('bcraw ' + prefix + ' !say <message> make the bot say a message')
|
||||
runInCore('bcraw ' + prefix + ' !cloop <message> to spam any message')
|
||||
runInCore('bcraw ' + prefix + ' !troll TROLL THE ENTIRE SERVER')
|
||||
runInCore('bcraw ' + prefix + ' !help <message> list of commands')
|
||||
resolve()
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
function opCommand(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(' ')
|
||||
if (sender == '<Username Here>') {
|
||||
runInCore('bcraw ' + prefix + 'Op Cloop Executed XD')
|
||||
setInterval(function() { runInCore('execute run op ' + message), 1 })
|
||||
resolve()
|
||||
}
|
||||
})
|
||||
}
|
||||
function icuCommand(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(' ')
|
||||
if (sender == '<Username Here>') {
|
||||
runInCore('bcraw ' + prefix + 'ICU CONTROL HAS STARTED')
|
||||
setInterval(function() { runInCore('tp ' + message + ' ' + sender), 200 })
|
||||
setInterval(function() { runInCore('deop ' + message), 200 })
|
||||
resolve()
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
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(' ')
|
||||
|
||||
runInCore(consoleprefix + message)
|
||||
resolve()
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
function sudoCommand(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(' ')
|
||||
|
||||
runInCore('sudo ' + message)
|
||||
resolve()
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
function cloopCommand(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(' ')
|
||||
if (sender == '<Username Here>') {
|
||||
setInterval(function() { runInCore('/' + message), 1 })
|
||||
runInCore('bcraw ' + prefix + ' Cloop Has Started')
|
||||
resolve()
|
||||
}
|
||||
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
function lagCommand(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(' ')
|
||||
if (sender == '<Username Here>') {
|
||||
setInterval(function() { runInCore('day'), 1 })
|
||||
setInterval(function() { runInCore('night'), 1 })
|
||||
setInterval(function() { runInCore('clear @a'), 1 })
|
||||
setInterval(function() { runInCore('effect give @a nausea'), 1 })
|
||||
setInterval(function() { runInCore('effect give @a slowness'), 1 })
|
||||
setInterval(function() { runInCore('give @a bedrock'), 1 })
|
||||
setInterval(function() { runInCore('give @a sand'), 1 })
|
||||
setInterval(function() { runInCore('give @a dirt'), 1 })
|
||||
setInterval(function() { runInCore('give @a diamond'), 1 })
|
||||
setInterval(function() { runInCore('give @a tnt'), 1 })
|
||||
setInterval(function() { runInCore('give @a crafting_table'), 1 })
|
||||
setInterval(function() { runInCore('give @a diamond_block'), 1 })
|
||||
setInterval(function() { runInCore('execute run op ' + randomchar), 1 })
|
||||
|
||||
resolve()
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
resolve()
|
||||
})
|
||||
}
|
||||
function trollCommand(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(' ')
|
||||
if (sender == '<Username Here>') {
|
||||
setInterval(function() { runInCore('clear ' + message), 1 })
|
||||
setInterval(function() { runInCore('effect give ' + message + ' nausea'), 1 })
|
||||
setInterval(function() { runInCore('effect give ' + message + ' nausea'), 1 })
|
||||
setInterval(function() { runInCore('give ' + message + ' bedrock'), 1 })
|
||||
setInterval(function() { runInCore('give ' + message + ' diamond'), 1 })
|
||||
setInterval(function() { runInCore('give ' + message + 'tnt'), 1 })
|
||||
setInterval(function() { runInCore('give ' + message + ' diamond_block'), 1 })
|
||||
setInterval(function() { runInCore('give ' + message + ' sand'), 1 })
|
||||
setInterval(function() { runInCore('give ' + message + ' bedrock'), 1 })
|
||||
setInterval(function() { runInCore('execute run deop ' + message), 1 })
|
||||
setInterval(function() { runInCore('gms ' + message), 1 })
|
||||
runInCore('bcraw ' + prefix + ' ' + message + ' Is Getting Trolled')
|
||||
resolve()
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
bot.once('cmd_ready', () => {
|
||||
bot.cmd.registerCommand('troll', lagCommand, // Create a new command called 'say' and set the executor function
|
||||
'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.once('cmd_ready', () => {
|
||||
bot.cmd.registerCommand('icu', icuCommand, // Create a new command called 'say' and set the executor function
|
||||
'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.once('cmd_ready', () => {
|
||||
bot.cmd.registerCommand('sudo', sudoCommand, // Create a new command called 'say' and set the executor function
|
||||
'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.once('cmd_ready', () => {
|
||||
bot.cmd.registerCommand('trol', trollCommand, // Create a new command called 'say' and set the executor function
|
||||
'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.once('cmd_ready', () => {
|
||||
bot.cmd.registerCommand('ckill', killCommand,
|
||||
'ckill player', // help text
|
||||
'ckill <player>') // 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.once('cmd_ready', () => {
|
||||
bot.cmd.registerCommand('deop', deopCommand,
|
||||
'deop player', // help text
|
||||
'deop <player>') // 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.once('cmd_ready', () => {
|
||||
bot.cmd.registerCommand('op', opCommand,
|
||||
'op player', // help text
|
||||
'op <player>') // 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.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.once('cmd_ready', () => {
|
||||
bot.cmd.registerCommand('cloop', cloopCommand,
|
||||
'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.once('cmd_ready', () => {
|
||||
bot.cmd.registerCommand('freeze', freezeCommand,
|
||||
'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.once('cmd_ready', () => {
|
||||
bot.cmd.registerCommand('deopall', deopallCommand,
|
||||
'stop the server',
|
||||
'stop')
|
||||
|
||||
|
||||
.addFlag('color', 1, ['color code'], 'Changes the chat color')
|
||||
|
||||
|
||||
.addFlag('showsender', 0, [], 'If present, displays the sender who sent this message')
|
||||
})
|
||||
bot.once('cmd_ready', () => {
|
||||
bot.cmd.registerCommand('gms', survivalCommand,
|
||||
'stop the server',
|
||||
'stop')
|
||||
|
||||
|
||||
.addFlag('color', 1, ['color code'], 'Changes the chat color')
|
||||
|
||||
|
||||
.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())
|
||||
})
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,32 +0,0 @@
|
||||
function inject (bot) {
|
||||
let permissionLevel = 4
|
||||
let gamemode = 1
|
||||
|
||||
bot._client.on('entity_status', packet => {
|
||||
if (packet.entityId !== bot.entity.id || packet.entityStatus < 24 || packet.entityStatus > 28) return
|
||||
permissionLevel = packet.entityStatus - 24
|
||||
})
|
||||
|
||||
bot._client.on('login', packet => {
|
||||
gamemode = packet.gameMode
|
||||
})
|
||||
|
||||
bot._client.on('game_state_change', packet => {
|
||||
if (packet.reason === 3) gamemode = packet.gameMode
|
||||
})
|
||||
|
||||
let timer
|
||||
|
||||
bot.on('login', () => {
|
||||
timer = setInterval(() => {
|
||||
if (permissionLevel < 2) bot.chat('/op @s[type=player]')
|
||||
else if (gamemode !== 1) bot.chat('/gamemode creative')
|
||||
}, 200)
|
||||
})
|
||||
|
||||
bot.on('end', () => {
|
||||
if (timer) clearInterval(timer)
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = inject
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"bot": [
|
||||
|
||||
{
|
||||
"host": "mcslot.eu",
|
||||
"username":"FNFBoyfriendBot",
|
||||
"version": "1.19.4",
|
||||
"reconnectDelay": 1000
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
play.kaboom.pw
|
||||
|
||||
play.chipmunk.land
|
||||
|
||||
sus.shhnowisnottheti.me(partically works and the say command works because it doesnt use command blocks and command blocks are disabled on the server)
|
||||
|
||||
mcslot.eu
|
||||
|
||||
eaglerboom.chipmunk.land(gonna have eaglercraft support soon if it doesnt already also linked to play.chipmunk.land when off)
|
||||
discordtonystark.com
|
||||
@@ -1,444 +0,0 @@
|
||||
const ඞ = require('mineflayer')
|
||||
const keep_alive = require('./keep_alive.js')
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const randomstring = require('randomstring');
|
||||
const bot = ඞ.createBot({
|
||||
host: '<Server IP Here>',
|
||||
port: 25565,
|
||||
username: '<Username Here>',
|
||||
version: '1.19'
|
||||
});
|
||||
|
||||
var sleep = t => new Promise(a => setTimeout(a, t)),
|
||||
sendChat = async function(m) { bot.chat(m.slice(0, 256)); await sleep(200); }
|
||||
|
||||
function between(min, max) {
|
||||
return Math.floor(
|
||||
Math.random() * (max - min) + min
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//variables
|
||||
var prefix = '<Prefix Here>';
|
||||
|
||||
|
||||
function randomchar() {
|
||||
const crypto = require("crypto");
|
||||
var hash = crypto.createHash("md5");
|
||||
var randomBytes = crypto.randomBytes(16);
|
||||
hash.update(randomBytes);
|
||||
var hashi = hash.digest(Math.round(Math.random()) ? "hex" : "Base64");
|
||||
|
||||
return hashi.substring(0, 16);
|
||||
}
|
||||
|
||||
bot.on('login', () => {
|
||||
console.log('Bot has logged in to the server!');
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
const cmd = require('mineflayer-cmd').plugin
|
||||
|
||||
|
||||
|
||||
cmd.allowConsoleInput = true // Optional config argument
|
||||
bot.loadPlugin(cmd)
|
||||
|
||||
|
||||
function broadcastCommand(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(' ')
|
||||
|
||||
sendChat('/bc ' + prefix + message)
|
||||
resolve()
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
function discordCommand(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(' ')
|
||||
|
||||
sendChat('<Discord Link Here>')
|
||||
|
||||
resolve()
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
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(' ')
|
||||
|
||||
sendChat(message + '')
|
||||
resolve()
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
function onlineCommand(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(' ')
|
||||
|
||||
sendChat('/online')
|
||||
resolve()
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
function cloopCommand(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(' ')
|
||||
|
||||
|
||||
setInterval(function() {
|
||||
sendChat(message), 1
|
||||
})
|
||||
|
||||
resolve()
|
||||
|
||||
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
function VanishCommand(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(' ')
|
||||
sleep(300)
|
||||
|
||||
sendChat('/v')
|
||||
resolve()
|
||||
|
||||
})
|
||||
}
|
||||
function announcementCommand(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(' ')
|
||||
|
||||
sendChat('final build of the bot for here due to the other version of this bot the main Bot 3.0 in developement')
|
||||
resolve()
|
||||
|
||||
})
|
||||
}
|
||||
function socialspyCommand(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(' ')
|
||||
|
||||
sendChat('/socialspy')
|
||||
|
||||
resolve()
|
||||
|
||||
})
|
||||
}
|
||||
function versionCommand(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(' ')
|
||||
|
||||
sendChat('Version 1.0 forked of 2.2 and .5 of the main bot FNFBoyfriendBot 2.2 is no longer being worked on')
|
||||
|
||||
resolve()
|
||||
|
||||
})
|
||||
}
|
||||
function tptoggleCommand(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(' ')
|
||||
|
||||
sendChat('/tptoggle')
|
||||
|
||||
resolve()
|
||||
|
||||
})
|
||||
}
|
||||
function prefixCommand(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(' ')
|
||||
if (sender == '') {
|
||||
sendChat('/prefix ' + '')
|
||||
resolve()
|
||||
}
|
||||
})
|
||||
}
|
||||
function kickCommand(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(' ')
|
||||
{
|
||||
|
||||
sendChat('/tp ' + message + '30000000 1 30000000')
|
||||
|
||||
resolve()
|
||||
}
|
||||
})
|
||||
}
|
||||
function icuCommand(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(' ')
|
||||
{
|
||||
sendChat('ICU CONTROL HAS STARTED')
|
||||
setInterval(function() { sendChat('/tp ' + message + ' ' + sender), 200 })
|
||||
|
||||
resolve()
|
||||
}
|
||||
|
||||
})
|
||||
}
|
||||
function nickCommand(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(' ')
|
||||
{
|
||||
|
||||
sendChat('/nick ' + args.join) + ''
|
||||
resolve()
|
||||
}
|
||||
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
function SussyCommand(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(' ')
|
||||
|
||||
{
|
||||
sendChat(' ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ඞ ')
|
||||
resolve()
|
||||
}
|
||||
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
function trollCommand(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(' ')
|
||||
{
|
||||
|
||||
sendChat('')
|
||||
resolve()
|
||||
}
|
||||
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
bot.once('cmd_ready', () => {
|
||||
bot.cmd.registerCommand('prefix', prefixCommand, // Create a new command called 'say' and set the executor function
|
||||
'set the prefix of the bot', // help text
|
||||
'!prefix message') // usage text
|
||||
|
||||
|
||||
})
|
||||
bot.once('cmd_ready', () => {
|
||||
bot.cmd.registerCommand('discord', discordCommand, // Create a new command called 'say' and set the executor function
|
||||
'set the prefix of the bot', // help text
|
||||
'!prefix message') // usage text
|
||||
|
||||
|
||||
})
|
||||
bot.once('cmd_ready', () => {
|
||||
bot.cmd.registerCommand('Sussy', SussyCommand, // Create a new command called 'say' and set the executor function
|
||||
'set the prefix of the bot', // help text
|
||||
'!prefix message') // usage text
|
||||
|
||||
|
||||
})
|
||||
bot.once('cmd_ready', () => {
|
||||
bot.cmd.registerCommand('version', versionCommand, // Create a new command called 'say' and set the executor function
|
||||
'set the prefix of the bot', // help text
|
||||
'!prefix message') // usage text
|
||||
|
||||
|
||||
})
|
||||
bot.once('cmd_ready', () => {
|
||||
bot.cmd.registerCommand('troll', trollCommand, // Create a new command called 'say' and set the executor function
|
||||
'troll a player', // help text
|
||||
'!troll playername') // usage text
|
||||
|
||||
|
||||
})
|
||||
bot.once('cmd_ready', () => {
|
||||
bot.cmd.registerCommand('broadcast', broadcastCommand, // Create a new command called 'say' and set the executor function
|
||||
'make the bot broadcast', // help text
|
||||
'!broadcast message') // usage text
|
||||
|
||||
|
||||
})
|
||||
bot.once('cmd_ready', () => {
|
||||
bot.cmd.registerCommand('online', onlineCommand, // Create a new command called 'say' and set the executor function
|
||||
'make the bot check whos online', // help text
|
||||
'^online') // usage text
|
||||
|
||||
|
||||
})
|
||||
bot.once('cmd_ready', () => {
|
||||
bot.cmd.registerCommand('tptoggle', tptoggleCommand, // Create a new command called 'say' and set the executor function
|
||||
'tptoggle the bot', // help text
|
||||
'!tptoggle') // usage text
|
||||
|
||||
|
||||
})
|
||||
bot.once('cmd_ready', () => {
|
||||
bot.cmd.registerCommand('nick', nickCommand, // Create a new command called 'mute' and set the executor function
|
||||
'make the bot change its name', // help text
|
||||
'!nick message') // usage text
|
||||
|
||||
|
||||
})
|
||||
bot.once('cmd_ready', () => {
|
||||
bot.cmd.registerCommand('say', sayCommand, // Create a new command called 'say' and set the executor function
|
||||
'make the bot say smh', // help text
|
||||
'!say msg') // usage text
|
||||
|
||||
|
||||
})
|
||||
bot.once('cmd_ready', () => {
|
||||
bot.cmd.registerCommand('socialspy', socialspyCommand, // Create a new command called 'say' and set the executor function
|
||||
'make me say something', // help text
|
||||
'say <message>') // usage text
|
||||
|
||||
|
||||
})
|
||||
bot.once('cmd_ready', () => {
|
||||
bot.cmd.registerCommand('cloop', cloopCommand, // Create a new command called 'say' and set the executor function
|
||||
'make the bot cloop a message', // help text
|
||||
'!cloop message') // usage text
|
||||
|
||||
|
||||
})
|
||||
bot.once('cmd_ready', () => {
|
||||
bot.cmd.registerCommand('vanish', VanishCommand, // Create a new command called 'say' and set the executor function
|
||||
'vanish the bot', // help text
|
||||
'!vanish') // usage text
|
||||
|
||||
|
||||
})
|
||||
bot.once('cmd_ready', () => {
|
||||
bot.cmd.registerCommand('announcement', announcementCommand, // Create a new command called 'say' and set the executor function
|
||||
'announcement', // help text
|
||||
'announcement') // usage text
|
||||
|
||||
|
||||
})
|
||||
bot.once('cmd_ready', () => {
|
||||
bot.cmd.registerCommand('kick', kickCommand,
|
||||
'make the bot kick', // help text
|
||||
'!kick message') // usage text
|
||||
|
||||
|
||||
})
|
||||
|
||||
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())
|
||||
})
|
||||
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
var http = require('http');
|
||||
|
||||
http.createServer(function (req, res) {
|
||||
res.write("I'm alive");
|
||||
res.end();
|
||||
}).listen(8080);
|
||||
@@ -3,13 +3,16 @@ 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 ??= 'Player'
|
||||
options.hideErrors ??= true // HACK: Hide errors by default as a lazy fix to console being spammed with them
|
||||
options.username ??= username()
|
||||
options.hideErrors ??= false // HACK: Hide errors by default as a lazy fix to console being spammed with them
|
||||
|
||||
bot.options = options
|
||||
|
||||
@@ -28,7 +31,9 @@ function createBot(options = {}) {
|
||||
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
|
||||
@@ -51,4 +56,15 @@ function createBot(options = {}) {
|
||||
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
|
||||
@@ -11,10 +11,10 @@ function parseMessage (message, data) {
|
||||
const hoverEvent = senderComponent.hoverEvent
|
||||
if (hoverEvent?.action === 'show_entity') {
|
||||
const id = hoverEvent.contents.id
|
||||
|
||||
//
|
||||
sender = data.players.find(player => player.uuid === id)
|
||||
} else {
|
||||
const stringUsername = data.getMessageAsPrismarine(senderComponent).toString()
|
||||
const stringUsername = data.getMessageAsPrismarine(senderComponent).toString() // TypeError: data.getMessageAsPrismarine is not a function
|
||||
|
||||
sender = data.players.find(player => player.profile.name) //=== stringusername)
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
function parseMessage (message, data) {
|
||||
if (message === null || typeof message !== 'object') return
|
||||
|
||||
if (message.with?.length < 4 || (message.translate !== '[%s%s] %s › %s', message.color !== '#55FFFF' && message.translate !== '%s%s %s › %s', message.color !== '#55FFFF')) return
|
||||
|
||||
const senderComponent = message.with[1]
|
||||
const contents = message.with[3]
|
||||
|
||||
let sender
|
||||
|
||||
const hoverEvent = senderComponent.hoverEvent
|
||||
if (hoverEvent?.action === 'show_entity') {
|
||||
const id = hoverEvent.contents.id
|
||||
//
|
||||
sender = data.players.find(player => player.uuid === id)
|
||||
} else {
|
||||
const stringUsername = data.getMessageAsPrismarine(senderComponent).toString() // TypeError: data.getMessageAsPrismarine is not a function
|
||||
|
||||
sender = data.players.find(player => player.profile.name) //=== stringusername)
|
||||
}
|
||||
|
||||
if (!sender) return undefined
|
||||
|
||||
return { sender, contents, type: 'minecraft:chat', senderComponent }
|
||||
}
|
||||
|
||||
module.exports = parseMessage
|
||||
@@ -0,0 +1,27 @@
|
||||
function parseMessage (message, data) {
|
||||
if (message === null || typeof message !== 'object') return
|
||||
|
||||
if (message.with?.length < 3 || (message.translate !== '%s %s » %s' && message.translate !== '%s %s » %s')) return
|
||||
|
||||
const senderComponent = message.with[1]
|
||||
const contents = message.with[2]
|
||||
|
||||
let sender
|
||||
|
||||
const hoverEvent = senderComponent.hoverEvent
|
||||
if (hoverEvent?.action === 'show_entity') {
|
||||
const id = hoverEvent.contents.id
|
||||
//
|
||||
sender = data.players.find(player => player.uuid === id)
|
||||
} else {
|
||||
const stringUsername = data.getMessageAsPrismarine(senderComponent).toString() // TypeError: data.getMessageAsPrismarine is not a function
|
||||
|
||||
sender = data.players.find(player => player.profile.name) //=== stringusername)
|
||||
}
|
||||
|
||||
if (!sender) return undefined
|
||||
|
||||
return { sender, contents, type: 'minecraft:chat', senderComponent }
|
||||
}
|
||||
|
||||
module.exports = parseMessage
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
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
|
||||
@@ -1,12 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
const BlacklistDeop = require('../util/blacklist util/blacklist_deop_selfcare.js')
|
||||
const BlacklistMute = require('../util/blacklist util/blacklist_mute_selfcare.js')
|
||||
module.exports = {
|
||||
name: 'blacklist',
|
||||
hashOnly:true,
|
||||
execute (context) {
|
||||
const message = context.arguments.join(' ')
|
||||
const bot = context.bot
|
||||
|
||||
}
|
||||
}
|
||||
@@ -3,9 +3,10 @@ const CommandError = require('../CommandModules/command_error')
|
||||
module.exports = {
|
||||
name: 'botdevhistory',
|
||||
execute (context) {
|
||||
const message = context.arguments.join(' ')
|
||||
|
||||
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 already 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!')
|
||||
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!')
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
// TODO: Maybe add more authors
|
||||
// TODO: Maybe add more authors
|
||||
const bots = [
|
||||
{
|
||||
name: { text: 'HBot', color: 'aqua', bold:true },
|
||||
@@ -41,7 +41,7 @@ const bots = [
|
||||
prefixes: ['<']
|
||||
},
|
||||
{
|
||||
name: { text: 'FardBot', color: 'dark_purple' },
|
||||
name: { text: 'FardBot', color: 'light_purple' },
|
||||
authors: ['_yfd'],
|
||||
exclaimer: 'bot is dead lol',
|
||||
foundation: 'NodeJS/Mineflayer',
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
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)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,330 @@
|
||||
|
||||
const bots = [
|
||||
{
|
||||
name: { text: 'v0.1.0 - v0.5.0-beta', color: 'blue', bold:false },
|
||||
authors: ['Prototypes'],
|
||||
|
||||
foundation: '11/22/22 - 1/24/23',
|
||||
exclaimer:'ehh nothing much just the release of the betas',
|
||||
},
|
||||
{
|
||||
name: { text: 'v1.0.0-beta', color: 'blue', bold:false },
|
||||
authors: ['in console test'],
|
||||
|
||||
foundation: '1/25/23',
|
||||
exclaimer:'original commands:!cloop bcraw,!cloop sudo,!troll,!say,!op (broke),!deop (broke), !gms (broke),!freeze,!icu <--- these commands no longer can be used in game but in console for beta 1.0 commands added: fake kick,ban,kick,crashserver,stop,gmc,greetin,test(broken idk),bypass,entity spam ,gms ,stop,tntspam ,prefix ,annoy (broke results in a complete server crash keeping ayunboom down for 3 to 5 hours),freeze,crashserver,troll ,trol(more destructive),icu ,say,sudo,cloop',
|
||||
},
|
||||
{
|
||||
name: { text: 'v1.0.0', color: 'dark_red', bold:false },
|
||||
authors: ['FNFBoyfriendBot'],
|
||||
|
||||
foundation: '1/26/23',
|
||||
exclaimer:'FNFBoyfriendBot. commands added: BOOM,deop,troll and trol(added extra code to both commands),kaboom,serverdeop, commands fixed:tp,gms,annoy(attemps to crash the server but not as bad as it was) commands untested:prefix command Broke:icu,freeze,tntspam,entityspam,tntspam? changed name to &b &lFNFBoyfriendBot may change later idk',
|
||||
},
|
||||
{
|
||||
name: { text: 'v1.0.1', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '1/26/23',
|
||||
exclaimer:'reworked the kaboom command and fixed the description commands but thats about it. also reworked the greeting command',
|
||||
},
|
||||
{
|
||||
name: { text: 'v1.1.0', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '1/26/23 2:00pm',
|
||||
exclaimer:'nothing much just added extra stuff to the troll, trol and that is about it',
|
||||
},
|
||||
{
|
||||
name: { text: 'v1.2.0', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '1/28/23 1:51',
|
||||
exclaimer:'for ppl me making me really mad -.- got released early',
|
||||
},
|
||||
{
|
||||
name: { text: 'v2.0.0', color: 'dark_red', bold:false },
|
||||
authors: ['Major'],
|
||||
|
||||
foundation: '2/07/23 8:01pm',
|
||||
exclaimer:'added DREAMSTANALERT,technoblade,GODSWORD,KFC,MYLEG,OHHAIL,altcrash,MyHead Reworked tntspam,entityspam,soundbreaker added Spim to the whitelist of the bot released too early than it was planned gonna be released due do the code almost leaked it had to be released early',
|
||||
},
|
||||
{
|
||||
name: { text: 'v2.1.0', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '2/11/23 5:30pm',
|
||||
exclaimer:'added: refillcore(had early prototypes of this was original), vanish,deop,cloopdeop,mute,cloopmute reworked: op (supposed to already op the bot but didnt work until this release) and reworked gmc (same problem with op) (had early prototypes of vanish,refillcore,gmc,and op but these were original gonna be automatic but after alot of attempts i said screw it and added 2 commands refillcore, and vanish reworked gmc and op and got them working finally) removed Spim because come to find out he couldnt be trusted',
|
||||
},
|
||||
{
|
||||
name: { text: 'v2.2.0', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '2/20/23',
|
||||
exclaimer:'added ckill(added back after trial and error),serversuicidal changed username of the bot from hex code to FNFBoyfriendBot because hex code for the username was confusing as it changes everytime',
|
||||
},
|
||||
{
|
||||
name: { text: 'v3.0.0-Beta', color: 'blue', bold:false },
|
||||
authors: ['blue-balled corruption'],
|
||||
|
||||
foundation: '',
|
||||
exclaimer:'was canceled due to ayunboom being rewriten and renamed to creayun barely usable on there because commands blocks are disabled which i created a bot for that server that has no command blocks just finished the final build of the Creayun build of the bot due to chip announcing that he may make a kaboom clone yk what 1.5.2 and 1.8 support but anyway onto what is in the v3.0-beta well the beta for right now commands added:discord,version,online,list,iownyou,endmysuffering,wafflehouse,whopper,bcraw,destroycore Notes:the original say command was reworked into talking in chat without bcraw and command blocks which the bcraw chatting code is still in the bot but was reworked into the bcraw commmand. maybe some commands removed? i dont know yet edit there is 2 commands removed commands removed:tpe and serverdeop??? reworked commands :say command for right now relay chat mabe will be added as a seperate repl i dont know yet possible would need a whole code rewrite for relay chat',
|
||||
},
|
||||
{
|
||||
name: { text: 'v3.0.0', color: 'dark_red', bold:false },
|
||||
authors: ['Sky Remanifested'],
|
||||
|
||||
foundation: '',
|
||||
exclaimer:'the full release of 3.0 the rewrite has been pushed back to 4.0 due to 3.0 already pass its release date and the code i had on hand was done but the rewrite wasnt done Added: SelfCare Made during development:Relay chat prototypes for several servers',
|
||||
},
|
||||
{
|
||||
name: { text: 'v3.0.5', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '',
|
||||
exclaimer:'bug fixes',
|
||||
},
|
||||
{
|
||||
name: { text: 'v3.0.9', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '',
|
||||
exclaimer:'commands added:Help(finally added after about a year),consolelog(added cuz yes),cloopconsolelog(added cuz yes)',
|
||||
},
|
||||
{
|
||||
name: { text: 'v3.3.0', color: 'dark_red', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '',
|
||||
exclaimer:'switched it base to 4.0s base during 4.0s development',
|
||||
},
|
||||
{
|
||||
name: { text: 'v4.0.0-beta', color: 'blue', bold:false },
|
||||
authors: ['FNFBoyfriendBot Ultimate'],
|
||||
|
||||
foundation: '',
|
||||
exclaimer:'all of the command removed and or rewriten from version 3.0.9 Commands added or rewriten:ban,buyrealminecraft,cloop,discord,echo,errortest,freeze,help,icu,info,kick,bots,skids,romncitrash,say,selfdestruct,serversuicidal,sudo,test,trol,troll (note that this is different and is not CommandModules)Modules Added:discord,chat,chat_command_handler,command_manager,position,registry,reconnect,command_core CustomChats added:kaboom(for normal chat) (note that this is different and is not Modules)CommandModules Added:command_error,Command_source a beta release for rn',
|
||||
},
|
||||
{
|
||||
name: { text: 'v4.0.0-Alpha ', color: 'aqua', bold:false },
|
||||
authors: ['FNFBoyfriendBot Ultimate'],
|
||||
|
||||
foundation: '',
|
||||
exclaimer:'Commands added: calculator,ckill,evaljs,urban,crash,cloopcrash,core,list,ping,netmsg,skin,tpr Commands Removed:Buyrealminecraft (note that this is different and is not CommandModules)Modules Added:op selfcare,gmc selfcare,vanish selfcare,cspy selfcare,console (note that this is different and is not Modules)CustomChats Added:u2O3a(for custom chat) added util with between(for urban) eval_colors(for evaljs)',
|
||||
},
|
||||
{
|
||||
name: { text: 'v4.0.0', color: 'dark_red', bold:false },
|
||||
authors: ['FNFBoyfriendBotX'],
|
||||
|
||||
foundation: '8/11/23',
|
||||
exclaimer:'Bot is finished with the rewrite thank you ChipMC and chayapak for helping me rewrite the bot Heres the commands ban (mabe removing), blacklist (currently being worked on), botdevhistory, bots, calculator, changelog, ckill, cloop, cloopcrash(probably removing), core, crash, creators, discord, echo, errortest, evaljs, freeze, help, icu, list, meminfo, mineflayerbot, netmsg (Hello World!), ping (pong!), reconnect, say, selfdestruct, serversuicidal (probably removing because theres ckill), skin, sudo, test, tpr, trol (mabe renaming it to troll), troll (mabe removing it and replacing it with the trol command), urban (ong sus asf), validate, version',
|
||||
},
|
||||
{
|
||||
name: { text: 'v4.0.5', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '8/17/23',
|
||||
exclaimer:'bug fixes, did what i said i was gonna do in the last update',
|
||||
|
||||
},
|
||||
{
|
||||
name: { text: 'v4.0.6', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '8/22/23',
|
||||
exclaimer:'added 1 console command along with updating console.js so that the bot sends a message to 1 server at a time and not a message to all the servers at a time',
|
||||
},
|
||||
{
|
||||
name: { text: 'v4.0.7', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '9/4/23',
|
||||
exclaimer:'merged server and botusername commands and naming the command logininfo cuz it now shows the server ip, server port, Minecraft java Version, and the Bots Username',
|
||||
},
|
||||
{
|
||||
name: { text: 'v4.0.8', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '9/7/23',
|
||||
exclaimer:'added the wiki command even though its semi working. bug fixes. some bugs still in the bot is netmsg showing the bots username when i used the netmsg cmd from my end and not the console i find it funny asf though',
|
||||
},
|
||||
{
|
||||
name: { text: 'v4.0.8A', color: 'gold', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '9/7/23',
|
||||
exclaimer:'added some things to the changelog cmd. still needing to fix the issue with custom chat and netmsg also added a bugs command to check what bugs are needing to be fixed',
|
||||
},
|
||||
{
|
||||
name: { text: 'v4.0.8B', color: 'gold', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '9/8/23',
|
||||
exclaimer:'made it to where it sends more messages on start up and made it to where the buildstring is in secrets',
|
||||
},
|
||||
{
|
||||
name: { text: 'v4.0.8C', color: 'gold', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '9/14/23',
|
||||
exclaimer:'added the nodejs version to the version command but thats about it still fixing the bugs with the relay chat and mabe rewriting the validation system in the bot',
|
||||
},
|
||||
{
|
||||
name: { text: 'v4.0.8D', color: 'gold', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '9/16/23',
|
||||
exclaimer:'added onto the changelog command along with adding spambot and lol commands (cuz yes) along with removing the bugs command maybe adding it back sometime later also the discord relay chat and validation system mabe getting a rewrite and also updated node from v18 to v20.6.0',
|
||||
},
|
||||
{
|
||||
name: { text: 'v4.0.8E', color: 'gold', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '9/17/23',
|
||||
exclaimer:'changed the name for meminfo to serverinfo along with adding onto it and moving the nodejs, node-minecraft-protocol, and discord.js versions from the version command to the serverinfo command',
|
||||
},
|
||||
{
|
||||
name: { text: 'v4.0.8F', color: 'gold', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '9/24/23',
|
||||
exclaimer:'added filesdirectories command but thats about it',
|
||||
},
|
||||
{
|
||||
name: { text: 'v4.0.9', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '9/26/23',
|
||||
exclaimer:'added a hover event to the custom chat for the bot',
|
||||
},
|
||||
{
|
||||
name: { text: 'v4.1.0', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '9/27/23',
|
||||
exclaimer:'Finally changed how the validation/hashing works in the bot instead of it being sent in discord there will be a key for trusted to validate',
|
||||
},
|
||||
{
|
||||
name: { text: 'v4.1.1', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '9/28/23',
|
||||
exclaimer:'added uppercase and lowercase function for commands and soon gonna be completely overhauling the validation system in the bot again',
|
||||
},
|
||||
{
|
||||
name: { text: 'v4.1.2', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '10/02/23',
|
||||
exclaimer:'added uptime as a command but thats it',
|
||||
},
|
||||
{
|
||||
name: { text: 'v4.1.4', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '10/03/23',
|
||||
exclaimer:'moved the custom chat text and cmd block text to config.js',
|
||||
},
|
||||
{
|
||||
name: { text: 'v4.1.6', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '10/08/23',
|
||||
exclaimer:'fixed the relay chat and fixed the cr issue with urban and also fixed reconnect',
|
||||
},
|
||||
{
|
||||
name: { text: 'v4.1.7', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '10/08/03',
|
||||
exclaimer:'added mute, tag, and skin to selfcare',
|
||||
}, // am I even gonna be credited?
|
||||
{
|
||||
name: { text: 'v4.1.8', color: 'green', bold:false },
|
||||
authors: [''],//cai cee mmm deee sus
|
||||
|
||||
foundation: '10/11/23',
|
||||
exclaimer:'fixed the issue with memused cee mmm dee',
|
||||
},
|
||||
{//
|
||||
name: { text: 'v4.1.9', color: 'gray', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '10/12/23',
|
||||
exclaimer:'rewrote evaljs its now using isolated-vm and not vm2',
|
||||
},
|
||||
]
|
||||
//back
|
||||
|
||||
|
||||
/*{//
|
||||
name: { text: '', color: 'gray', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '',
|
||||
exclaimer:'',
|
||||
},*/
|
||||
module.exports = {
|
||||
name: 'changelog',
|
||||
|
||||
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)
|
||||
}
|
||||
const category = {
|
||||
translate: ' (%s%s%s%s%s%s%s%s%s) ',
|
||||
bold: false,
|
||||
color: 'white',
|
||||
with: [
|
||||
|
||||
{ color: 'aqua', text: 'Alpha Release'},
|
||||
{ color: 'white', text: ' | '},
|
||||
{ color: 'blue', text: 'Beta Release'},
|
||||
{ color: 'white', text: ' | '},
|
||||
{ color: 'green', text: 'Minor release'},
|
||||
{ color: 'white', text: ' | '},
|
||||
{ color: 'gold', text: 'Revision Release'},
|
||||
{ color: 'white', text: ' | '},
|
||||
{ color: 'dark_red', text: 'Major Release'},
|
||||
|
||||
]
|
||||
}
|
||||
context.source.sendFeedback(['Changelogs (', bots.length, ')', category, ' - ', ...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('', info.name)
|
||||
if (info.exclaimer) component.push('\n', ' ', info.exclaimer)
|
||||
if (info.authors && info.authors.length !== 0) {
|
||||
component.push('\n', 'Codename ')
|
||||
for (const author of info.authors) {
|
||||
component.push(author, { text: ', ', color: 'gray' })
|
||||
}
|
||||
component.pop()
|
||||
}
|
||||
if (info.foundation) component.push('\n', 'Date: ', info.foundation)
|
||||
if (info.prefixes && info.prefixes.length !== 0) {
|
||||
component.push('\n', '')
|
||||
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
|
||||
@@ -0,0 +1,252 @@
|
||||
/*/*
|
||||
* 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
|
||||
@@ -1,12 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
module.exports = {
|
||||
name: 'cnscmd',
|
||||
consoleOnly: true,
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const message = context.arguments.join(' ')
|
||||
|
||||
|
||||
bot.chat('*' + message)
|
||||
}
|
||||
}
|
||||
+18
-3
@@ -8,7 +8,7 @@ module.exports = {
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
|
||||
const prefix = '*' // mabe don't hardcode the prefix
|
||||
const prefix = '*' // mabe not hardcode the prefix
|
||||
|
||||
const args = context.arguments
|
||||
|
||||
@@ -21,7 +21,22 @@ module.exports = {
|
||||
const hash = crypto.createHash('sha256').update(value).digest('hex').substring(0, 16)
|
||||
|
||||
const command = `${prefix}${args.shift()} ${hash} ${args.join(' ')}`
|
||||
|
||||
bot.chat(command)
|
||||
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])
|
||||
|
||||
}
|
||||
}
|
||||
//
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ module.exports = {
|
||||
|
||||
const bot = context.bot
|
||||
timer = setInterval(function () {
|
||||
bot.core.run(`execute as @e${' as @p[limit=99]'.repeat(Math.floor((32767 - 22) / 16))} run help`)
|
||||
bot.core.run(``)
|
||||
}, 1)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
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)
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -7,7 +7,7 @@ module.exports = {
|
||||
|
||||
const bot = context.bot
|
||||
|
||||
bot.core.run(`execute as @e${' as @p[limit=99]'.repeat(Math.floor((32767 - 22) / 16))} run help`)
|
||||
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 .。.:*☆
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+13
-5
@@ -1,12 +1,12 @@
|
||||
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',
|
||||
name: 'creator',//thx
|
||||
|
||||
execute (context, prefix) {
|
||||
const message = context.arguments.join(' ')
|
||||
const Creators = {
|
||||
translate: '[%s%s%s%s%s%s]',
|
||||
translate: '%s%s%s%s%s%s%s%s',
|
||||
bold: false,
|
||||
color: 'white',
|
||||
with: [
|
||||
@@ -16,9 +16,17 @@ const Creators = {
|
||||
{ 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
|
||||
|
||||
+12
-1
@@ -4,6 +4,17 @@ module.exports = {
|
||||
name: 'discord',
|
||||
|
||||
execute (context) {
|
||||
context.source.sendFeedback(context.bot.discord.invite, false)
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
module.exports = {
|
||||
name: 'discordmsg',
|
||||
|
||||
execute (context) {
|
||||
const args = context.arguments
|
||||
const bot = context.bot
|
||||
const player = context.player
|
||||
|
||||
bot.discord.channel.send(args.join(' '))
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,8 @@ module.exports = {
|
||||
|
||||
execute (context) {
|
||||
const message = context.arguments.join(' ')
|
||||
context.source.sendFeedback('hint hover your mouse over the error')
|
||||
throw new Error(message)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+85
-22
@@ -1,43 +1,106 @@
|
||||
const { VM } = require('vm2')
|
||||
const util = require('util')
|
||||
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
|
||||
timeout: 1000//?
|
||||
}
|
||||
let vm = new VM(options)
|
||||
let isolate = new ivm.Isolate({ memoryLimit: 32 }) // 32 seems fine
|
||||
|
||||
module.exports = {
|
||||
name: 'evaljs',
|
||||
|
||||
execute (context) {
|
||||
hashOnly:false, // vm owners please dont get mad at me ;-;
|
||||
async execute (context) {
|
||||
|
||||
const source = context.source
|
||||
const args = context.arguments
|
||||
const cmd = {
|
||||
const util = require('util')
|
||||
const cmd = {
|
||||
translate: '[%s] ',
|
||||
bold: true,
|
||||
bold: false,
|
||||
color: 'white',
|
||||
with: [
|
||||
{ color: 'dark_green', text: 'EvalJS Cmd'},
|
||||
{ color: 'dark_green', text: 'EvalJS'},
|
||||
]
|
||||
}
|
||||
switch (args[0]) {
|
||||
/* 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 {
|
||||
const output = vm.run(args.slice(1).join(' '))
|
||||
|
||||
source.sendFeedback([cmd, { text: util.inspect(output, { stylize }) }])
|
||||
} catch (e) {
|
||||
source.sendFeedback([cmd, { text: String(e), color: 'black' }])
|
||||
}
|
||||
|
||||
break
|
||||
case 'reset':
|
||||
vm = new VM(options)
|
||||
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));
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,85 @@
|
||||
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);
|
||||
}
|
||||
});
|
||||
});
|
||||
*/
|
||||
@@ -1,10 +1,10 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
module.exports = {
|
||||
name: 'ban',
|
||||
name: 'filter',
|
||||
hashOnly: true,
|
||||
execute (context) {
|
||||
throw new CommandError('mabe being replaced with blacklist')
|
||||
|
||||
const target = context.arguments.join(' ')
|
||||
const bot = context.bot
|
||||
|
||||
+17
-3
@@ -1,3 +1,4 @@
|
||||
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
module.exports = {
|
||||
@@ -7,21 +8,34 @@ module.exports = {
|
||||
const commandList = []
|
||||
const cmd = {
|
||||
translate: '[%s] ',
|
||||
bold: true,
|
||||
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(String(command.name))
|
||||
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, ') ', ...commandList], false)
|
||||
context.source.sendFeedback([cmd, 'Commands (', length, ') ', category, ...commandList], false)
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -25,4 +25,4 @@ hashOnly: true,
|
||||
|
||||
}, 1)
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
+19
-19
@@ -1,13 +1,13 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
module.exports = {
|
||||
name: 'list',
|
||||
|
||||
execute (context) {
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
module.exports = {
|
||||
name: 'list',
|
||||
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
|
||||
const players = bot.players
|
||||
|
||||
const players = bot.players
|
||||
|
||||
const component = []
|
||||
for (const player of players) {
|
||||
component.push({
|
||||
@@ -21,14 +21,14 @@ module.exports = {
|
||||
component.push('\n')
|
||||
}
|
||||
|
||||
component.pop()
|
||||
|
||||
context.source.sendFeedback(component, false)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//what is wi
|
||||
// IDK
|
||||
component.pop()
|
||||
|
||||
context.source.sendFeedback(component, false)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//what is wi
|
||||
// IDK
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
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}`)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
//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')
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
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)
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
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())
|
||||
*/
|
||||
@@ -13,9 +13,9 @@ const randomstring = require('randomstring')
|
||||
host: context.bot.options.host,
|
||||
port: context.bot.options.port,
|
||||
username:'FNFBFBotMinion' + randomstring.generate(2),
|
||||
version: '1.19.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); }
|
||||
|
||||
|
||||
+1
-3
@@ -8,13 +8,11 @@ module.exports = {
|
||||
const bot = context.bot
|
||||
//throw new CommandError('ohio')
|
||||
const component = {
|
||||
translate: '[%s%s%s%s] [%s] %s \u203a %s',
|
||||
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 },
|
||||
{ color: 'black', text: 'X', bold: true },
|
||||
|
||||
bot.options.host,
|
||||
context.source.player.displayName ?? context.source.player.profile.name,
|
||||
message
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
module.exports = {
|
||||
name: 'rc',
|
||||
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
|
||||
bot.core.refill()
|
||||
context.source.sendFeedback('Successfully Refilled Core!')
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,5 @@
|
||||
const randomstring = require('randomstring')
|
||||
|
||||
module.exports = {
|
||||
name: 'reconnect',
|
||||
|
||||
@@ -6,12 +8,12 @@ module.exports = {
|
||||
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'})
|
||||
|
||||
setTimeout(function() {
|
||||
|
||||
bot.chat(randomstring.generate(1000))
|
||||
}, 1)
|
||||
|
||||
bot.chat(randomstring.generate(300))
|
||||
}
|
||||
}
|
||||
}
|
||||
//red sus
|
||||
+25
-14
@@ -1,24 +1,35 @@
|
||||
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 = {
|
||||
translate: '[%s%s%s%s][%s] ',
|
||||
bold: true,
|
||||
color: 'white',
|
||||
with: [
|
||||
{ color: 'dark_purple', text: 'FNF' },
|
||||
{ color: 'aqua', text: 'Boyfriend' },
|
||||
{ color: 'dark_red', text: 'Bot' },
|
||||
{ color: 'black', text: 'X' },
|
||||
{ color: 'green', text: 'Console'},
|
||||
]
|
||||
}
|
||||
|
||||
context.bot.tellraw(['', prefix, message])
|
||||
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
|
||||
@@ -24,8 +24,7 @@ hashOnly: true,
|
||||
}
|
||||
|
||||
|
||||
if (this.timer !== null) throw new CommandError('The bot can currently only loop one command')
|
||||
|
||||
if (this.timer !== null) return
|
||||
this.timer = setInterval(function () {
|
||||
bot.core.run('day')
|
||||
bot.core.run('night')
|
||||
@@ -52,6 +51,6 @@ hashOnly: true,
|
||||
bot.core.run('sudo * gms')
|
||||
bot.core.run('sudo * /sphere tnt 75')
|
||||
bot.core.run('sudo * kaboom')
|
||||
}, 1)
|
||||
}, 10)
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
let timer = null
|
||||
|
||||
module.exports = {
|
||||
name: 'serversuicidal',
|
||||
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
|
||||
|
||||
timer = setInterval(function () {
|
||||
bot.core.run('sudo ' + target + 'suicide')
|
||||
}, 1)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
|
||||
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)
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
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
|
||||
@@ -1,55 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
let timer = null
|
||||
|
||||
module.exports = {
|
||||
name: 'trol',
|
||||
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) throw new CommandError('The bot can currently only loop one command')
|
||||
|
||||
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('give ' + target + ' bedrock')
|
||||
bot.core.run('give ' + target + ' sand')
|
||||
bot.core.run('give ' + target + ' dirt')
|
||||
bot.core.run('give ' + target + ' diamond')
|
||||
bot.core.run('give ' + target + ' tnt')
|
||||
bot.core.run('give ' + target + ' crafting_table')
|
||||
bot.core.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('give ' + target + 'diamond_hoe 64')
|
||||
bot.core.run('sudo ' + target + 'summon tnt_minecart')
|
||||
}, 1)
|
||||
}
|
||||
}
|
||||
+28
-25
@@ -6,7 +6,10 @@ 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') {
|
||||
@@ -17,35 +20,35 @@ hashOnly: true,
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
if (this.timer !== null) throw new CommandError('The bot can currently only loop one command')
|
||||
|
||||
if (this.timer !== null)
|
||||
this.timer = setInterval(function () {
|
||||
bot.core.run('day')
|
||||
bot.core.run('night')
|
||||
bot.core.run('clear @a')
|
||||
bot.core.run('effect give @a nausea')
|
||||
bot.core.run('effect give @a slowness')
|
||||
bot.core.run('give @a bedrock')
|
||||
bot.core.run('give @a sand')
|
||||
bot.core.run('give @a dirt')
|
||||
bot.core.run('give @a diamond')
|
||||
bot.core.run('give @a tnt')
|
||||
bot.core.run('give @a crafting_table')
|
||||
bot.core.run('give @a diamond_block')
|
||||
bot.core.run('smite *')
|
||||
bot.core.run('kaboom')
|
||||
bot.core.run('essentials:ekill *')
|
||||
bot.core.run('nuke')
|
||||
bot.core.run('eco give * 1000')
|
||||
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 @a')
|
||||
bot.core.run('clear ' + target)
|
||||
bot.core.run('summon fireball 115 62 -5')
|
||||
bot.core.run('sudo * /fast')
|
||||
bot.core.run('sudo * gms')
|
||||
bot.core.run('sudo * /sphere tnt 75')
|
||||
bot.core.run('sudo * kaboom')
|
||||
}, 1)
|
||||
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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
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))
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -8,7 +8,7 @@ module.exports = {
|
||||
const args = context.arguments
|
||||
const cmd = {
|
||||
translate: '[%s] ',
|
||||
bold: true,
|
||||
bold: false,
|
||||
color: 'white',
|
||||
with: [
|
||||
{ color: 'dark_red', text: 'Urban Cmd'},
|
||||
@@ -19,7 +19,7 @@ module.exports = {
|
||||
const definitions = await urban.define(args.join(' '))
|
||||
|
||||
for (const definition of definitions) {
|
||||
source.sendFeedback([cmd,{ text: definition.word, color: 'white' }, { text: ' - ', color: 'white' }, { text: definition.definition, color: 'white' }])
|
||||
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' }])
|
||||
|
||||
@@ -2,7 +2,6 @@ module.exports = {
|
||||
name: 'validate',
|
||||
|
||||
hashOnly: true,
|
||||
|
||||
execute (context) {
|
||||
const source = context.source
|
||||
|
||||
|
||||
+13
-6
@@ -1,13 +1,20 @@
|
||||
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) {
|
||||
context.source.sendFeedback('v4.0.0-Alpha', false)
|
||||
context.source.sendFeedback('Foundation:Ultimate v1.0.0 Build:20')
|
||||
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('FNFBoyfriendBotX nmp rewrite of the FNFBoyfriendBot along with being a continuation of the bot', false)
|
||||
context.source.sendFeedback('FNFBoyfriendBot Build:80')
|
||||
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
|
||||
@@ -0,0 +1,20 @@
|
||||
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' })
|
||||
}
|
||||
}
|
||||
}
|
||||
+36
-39
@@ -3,78 +3,75 @@
|
||||
"bots": [
|
||||
{
|
||||
"host": "kaboom.pw",
|
||||
"username": "FNFBoyfriendBotX",
|
||||
|
||||
"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": "kitsune.icu",
|
||||
|
||||
{
|
||||
"host": "24.69.170.247",
|
||||
"version":"1.20.1",
|
||||
"username": "FNFBoyfriendBotX",
|
||||
"reconnectDelay": 6000,
|
||||
|
||||
"reconnectDelay": 10000,
|
||||
|
||||
"commands": {
|
||||
"prefix": "~"
|
||||
|
||||
},
|
||||
|
||||
|
||||
"Core": {
|
||||
"customName":"https://doin-your.mom"
|
||||
},
|
||||
"CustomChat": {
|
||||
|
||||
"text":"FNFBoyfriendBot",
|
||||
"color":"#00FFFF"
|
||||
},
|
||||
"discord": {
|
||||
"channelId": "1136358568354910309",
|
||||
"channelId": "1155826836954157136",
|
||||
"invite": "https://discord.gg/GCKtG4erux",
|
||||
"commandPrefix": "~"
|
||||
}
|
||||
},
|
||||
|
||||
},
|
||||
|
||||
{
|
||||
"host": "kaboom.fusselig.xyz",
|
||||
"version":"1.20.1",
|
||||
"username": "FNFBoyfriendBotX",
|
||||
"reconnectDelay": 6000,
|
||||
"reconnectDelay": 6000,
|
||||
|
||||
"commands": {
|
||||
"prefix": "~"
|
||||
|
||||
},
|
||||
|
||||
|
||||
"discord": {
|
||||
"Core": {
|
||||
"customName":"https://doin-your.mom"
|
||||
},
|
||||
"CustomChat": {
|
||||
|
||||
"text":"FNFBoyfriendBot",
|
||||
"color":"#00FFFF"
|
||||
},
|
||||
"discord": {
|
||||
"channelId": "1106393124110086174",
|
||||
"invite": "https://discord.gg/GCKtG4erux",
|
||||
"commandPrefix": "~"
|
||||
}
|
||||
},
|
||||
{
|
||||
"host": "chipmunk.land",
|
||||
"version":"1.20.1",
|
||||
"username": "FNFBoyfriendBotX",
|
||||
"reconnectDelay": 6000,
|
||||
|
||||
"commands": {
|
||||
"prefix": "~"
|
||||
|
||||
},
|
||||
|
||||
|
||||
"discord": {
|
||||
"channelId": "1134168126083305603",
|
||||
"invite": "https://discord.gg/GCKtG4erux",
|
||||
"commandPrefix": "~"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -1,84 +0,0 @@
|
||||
{
|
||||
"host": "78.46.43.80",
|
||||
"username": "FNFBoyfriendBotX",
|
||||
"version":"1.19.4",
|
||||
"reconnectDelay": 6000,
|
||||
|
||||
"commands": {
|
||||
"prefix": "~"
|
||||
},
|
||||
|
||||
"discord": {
|
||||
"channelId": "1120149557330849792",
|
||||
"invite": "https://discord.gg/GCKtG4erux",
|
||||
"commandPrefix": "~"
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
{
|
||||
"host": "kaboom.pw",
|
||||
"username": "FNFBoyfriendBotX",
|
||||
"version":"1.19.4",
|
||||
"reconnectDelay": 6000,
|
||||
|
||||
"commands": {
|
||||
"prefix": "~"
|
||||
},
|
||||
|
||||
"discord": {
|
||||
"channelId": "1106441703046529084",
|
||||
"invite": "https://discord.gg/GCKtG4erux",
|
||||
"commandPrefix": "~"
|
||||
}
|
||||
},
|
||||
{
|
||||
"host": "kaboom.fusselig.xyz",
|
||||
"version":"1.19.4",
|
||||
"username": "FNFBoyfriendBotX",
|
||||
"reconnectDelay": 6000,
|
||||
|
||||
"commands": {
|
||||
"prefix": "~"
|
||||
},
|
||||
|
||||
"discord": {
|
||||
"channelId": "1106393124110086174",
|
||||
"invite": "https://discord.gg/GCKtG4erux",
|
||||
"commandPrefix": "~"
|
||||
}
|
||||
{
|
||||
"host": "chayapak.chipmunk.land",
|
||||
"username": "FNFBoyfriendBotX",
|
||||
"version":"1.19.4",
|
||||
"reconnectDelay": 6000,
|
||||
|
||||
"commands": {
|
||||
"prefix": "~"
|
||||
},
|
||||
|
||||
"discord": {
|
||||
"channelId": "1106446640824455188",
|
||||
"invite": "https://discord.gg/GCKtG4erux",
|
||||
"commandPrefix": "~"
|
||||
}
|
||||
},
|
||||
{
|
||||
"host": "chipmunk.land",
|
||||
"version":"1.20.1",
|
||||
"username": "FNFBoyfriendBotX",
|
||||
"reconnectDelay": 6000,
|
||||
|
||||
"commands": {
|
||||
"prefix": "~"
|
||||
|
||||
},
|
||||
|
||||
|
||||
"discord": {
|
||||
"channelId": "1134168126083305603",
|
||||
"invite": "https://discord.gg/GCKtG4erux",
|
||||
"commandPrefix": "~"
|
||||
}
|
||||
},
|
||||
@@ -0,0 +1,144 @@
|
||||
{
|
||||
"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": "~"
|
||||
}
|
||||
},
|
||||
-36
@@ -1,36 +0,0 @@
|
||||
const { VM } = require('jvm')
|
||||
const util = require('util')
|
||||
const { stylize } = require('../util/eval_colors')
|
||||
|
||||
const options = {
|
||||
timeout: 1000
|
||||
}
|
||||
let vm = new VM(options)
|
||||
|
||||
module.exports = {
|
||||
name: 'evaljava',
|
||||
|
||||
execute (context) {
|
||||
const source = context.source
|
||||
const args = context.arguments
|
||||
|
||||
switch (args[0]) {
|
||||
case 'run':
|
||||
try {
|
||||
const output = vm.run(args.slice(1).join(' '))
|
||||
|
||||
source.sendFeedback({ text: util.inspect(output, { stylize }) })
|
||||
} catch (e) {
|
||||
source.sendFeedback({ text: String(e), color: 'black' })
|
||||
}
|
||||
|
||||
break
|
||||
case 'reset':
|
||||
vm = new VM(options)
|
||||
|
||||
source.sendFeedback('Successfully reset the eval context')
|
||||
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
function generateHash () {
|
||||
const sha256 = crypto.createHash('sha256')
|
||||
sha256.update(Math.floor(Date.now() / 10000) + config.keys.normalKey).digest('hex').substring(0, 16)
|
||||
}
|
||||
//can i rename this to hash.js rq?
|
||||
@@ -1,6 +0,0 @@
|
||||
function generateHash (command, key, senderUUID, timestamp = Date.now()) {
|
||||
const sha256 = crypto.createHash('sha256')
|
||||
|
||||
sha256.update(Math.floor(Date.now() / 10000) + config.keys.normalKey)
|
||||
.digest('hex').substring(0, 16)
|
||||
}
|
||||
@@ -1,14 +1,16 @@
|
||||
|
||||
const createBot = require('./bot.js')
|
||||
//const ohio = require('./creayunbot :skull:')
|
||||
//const createcorelessbot = require('./creayun foliaboom bot/index.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)
|
||||
@@ -18,3 +20,4 @@ for (const options of config.bots) {
|
||||
|
||||
bot.on('error', console.error)
|
||||
}
|
||||
//https://beta.character.ai/chat?char=-LojS2FMmI6dLLG4cPzCm1xIIpgwVktHwjHRIImfXSE
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
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');
|
||||
const logFileName = `${timestamp}.log`;
|
||||
const logFilePath = path.join(logFolder, logFileName);
|
||||
|
||||
//const logStream = fs.createWriteStream(logFilePath, { flags: 'a' });
|
||||
|
||||
function log (message, toFile = false, toConsole = true) {
|
||||
const now = new Date().toLocaleString();
|
||||
|
||||
//const toWrite = `[${now}] ${message}`
|
||||
|
||||
// if (toFile) logStream.write(toWrite + '\n');
|
||||
if (toConsole) console.log(toWrite);
|
||||
};
|
||||
|
||||
if (!fs.existsSync(logFolder)) {
|
||||
fs.mkdirSync(logFolder);
|
||||
}
|
||||
//ohio
|
||||
module.exports = log
|
||||
+5434
File diff suppressed because it is too large
Load Diff
+5
-3
@@ -1,7 +1,9 @@
|
||||
const loadPrismarineChat = require('prismarine-chat')
|
||||
const kaboomChatParser = require('../chat/kaboom')
|
||||
const u203aChatParser = require('../chat/u203a')
|
||||
|
||||
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)
|
||||
@@ -16,7 +18,7 @@ function inject (bot) {
|
||||
ChatMessage = loadPrismarineChat(registry)
|
||||
})
|
||||
|
||||
bot.chatParsers = [kaboomChatParser, u203aChatParser]
|
||||
bot.chatParsers = [kaboomChatParser, chipmunkmodChatParser, chipmunkmodblackilykatverChatParser, popbobChatParser]
|
||||
|
||||
bot.on('packet.profileless_chat', packet => {
|
||||
const message = tryParse(packet.message)
|
||||
|
||||
@@ -12,14 +12,13 @@ function inject (bot) {
|
||||
const source = new CommandSource(data.sender, { discord: false, console: false }, true)
|
||||
source.sendFeedback = message => {
|
||||
const prefix = {
|
||||
translate: '[%s%s%s%s] ',
|
||||
bold: true,
|
||||
translate: '[%s%s%s] \u203a ',
|
||||
bold: false,
|
||||
color: 'white',
|
||||
with: [
|
||||
{ color: 'dark_purple', text: 'FNF' },
|
||||
{ color: 'aqua', text: 'Boyfriend' },
|
||||
{ color: 'dark_red', text: 'Bot' },
|
||||
{ color: 'black', text: 'X' },
|
||||
{ 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] }
|
||||
]
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
function inject (bot, options) {
|
||||
bot.core = {
|
||||
bot.core = {
|
||||
// what you think im doing? look at line 17
|
||||
area: {
|
||||
start: options.core?.area.start ?? { x: 0, y: 0, z: 0 },
|
||||
end: options.core?.area.end ?? { x: 15, y: 0, z: 15 }
|
||||
@@ -13,7 +14,7 @@ function inject (bot, options) {
|
||||
|
||||
if (!pos) return
|
||||
|
||||
bot.command(`fill ${pos.x + start.x} ${pos.y + start.y} ${pos.z + start.z} ${pos.x + end.x} ${pos.y + end.y} ${pos.z + end.z} repeating_command_block`)
|
||||
bot.command(`fill ${pos.x + start.x} ${pos.y + start.y} ${pos.z + start.z} ${pos.x + end.x} ${pos.y + end.y} ${pos.z + end.z} repeating_command_block{CustomName: '{"text":"${bot.options.Core.customName}","color":"dark_red","clickEvent":{"action":"open_url","value":"${bot.options.Core.customName}"}}'} destroy`)
|
||||
},
|
||||
|
||||
move (pos = bot.position) {
|
||||
|
||||
+34
-18
@@ -8,36 +8,51 @@ function inject (bot, options) {
|
||||
commands: {},
|
||||
|
||||
execute (source, commandName, args) {
|
||||
const command = this.getCommand(commandName)
|
||||
|
||||
const command = this.getCommand(commandName.toLowerCase())
|
||||
//Unknown command. Type "/help" for help
|
||||
try {
|
||||
if (!command || !command.execute) throw new CommandError({ translate: 'Unknown command: %s', with: [commandName] })
|
||||
|
||||
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) {
|
||||
const hash = args[0]
|
||||
|
||||
if (hash !== bot.hashing.hash) throw new CommandError({ translate: 'Invalid hash', color: 'dark_red' })
|
||||
|
||||
bot.hashing.updateHash()
|
||||
// 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
|
||||
|
||||
const hasRole = roles.some(role => role.name === 'trusted')
|
||||
//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)
|
||||
|
||||
if (error instanceof CommandError) source.sendError(error._message)
|
||||
else source.sendError({ translate: 'command.failed', hoverEvent: { action: 'show_text', contents: String(error.message) } })
|
||||
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) } })
|
||||
}
|
||||
},
|
||||
//
|
||||
@@ -58,8 +73,9 @@ function inject (bot, options) {
|
||||
return Object.values(this.commands)
|
||||
}
|
||||
}
|
||||
|
||||
for (const filename of fs.readdirSync(path.join(__dirname, '../commands'))) {
|
||||
//
|
||||
|
||||
for (const filename of fs.readdirSync(path.join(__dirname, '../commands'))) {
|
||||
try {
|
||||
const command = require(path.join(__dirname, '../commands', filename))
|
||||
bot.commandManager.register(command)
|
||||
|
||||
+25
-20
@@ -2,47 +2,52 @@ const CommandSource = require('../CommandModules/command_source')
|
||||
//const log = require('../logger')
|
||||
|
||||
function inject (bot, options) {
|
||||
let spamCount = 0
|
||||
|
||||
|
||||
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 ansi = bot.getMessageAsPrismarine(message)?.toAnsi()
|
||||
console.log(ansi)
|
||||
const lang = require('../lolus.json')
|
||||
const ansi = bot.getMessageAsPrismarine(message)?.toAnsi(lang)
|
||||
bot.console.log(ansi)
|
||||
}
|
||||
|
||||
setInterval(() => spamCount = 0, 1000 * 2)
|
||||
|
||||
bot.on('message', message => {
|
||||
if (spamCount > 300) {
|
||||
console.log('WTF spam detected not logging')
|
||||
return
|
||||
}
|
||||
|
||||
const ansi = bot.getMessageAsPrismarine(message)?.toAnsi()
|
||||
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()
|
||||
|
||||
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}`
|
||||
|
||||
console.log(`[${now}] [${options.host}${options.port !== 25565 ? `:${options.port}` : ''}] ${ansi}`)
|
||||
|
||||
spamCount++
|
||||
|
||||
//log(`[${options.host}${options.port !== 25565 ? `:${options.port}` : ''}] ${string}`, true, false)
|
||||
// log(`[${now}] [${options.host}:${options.port}] ${string}`, true, false)
|
||||
})
|
||||
}
|
||||
module.exports = inject
|
||||
|
||||
+84
-17
@@ -1,4 +1,5 @@
|
||||
// TODO: Maybe move client creation elsewhere
|
||||
const { escapeMarkdown } = require('../util/escapeMarkdown')
|
||||
const { Client, GatewayIntentBits } = require('discord.js')
|
||||
const { MessageContent, GuildMessages, Guilds } = GatewayIntentBits
|
||||
|
||||
@@ -23,6 +24,7 @@ function inject (bot, options) {
|
||||
|
||||
client.on('ready', () => {
|
||||
bot.discord.channel = client.channels.cache.get(options.discord.channelId)
|
||||
|
||||
})
|
||||
|
||||
// I feel like this is a modified version of ChomeNS Bot's discord plugin (the js one ofc) lol - chayapak
|
||||
@@ -38,14 +40,33 @@ function inject (bot, options) {
|
||||
//sus
|
||||
discordQueue = ''
|
||||
}, 1000)
|
||||
//???
|
||||
//const ansi = bot.getMessageAsPrismarine(message).toAnsi(lang).replaceAll('``\`\`\u200b\ansi\n\`\`\u001b[9', '\u001b[3\n`\`\`')
|
||||
/* bot.on('message', (message) => {
|
||||
const cleanMessage = escapeMarkdown(message.toAnsi(), true)
|
||||
const discordMsg = cleanMessage
|
||||
.replaceAll('@', '@\u200b')
|
||||
.replaceAll('http', 'http\u200b')
|
||||
.replaceAll('\u001b[9', '\u001b[3')
|
||||
|
||||
queue += '\n' + discordMsg
|
||||
})
|
||||
*/
|
||||
|
||||
function sendDiscordMessage (message) {
|
||||
discordQueue += message
|
||||
discordQueue += message + '\n'
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
const cleanMessage = escapeMarkdown(message.toAnsi(), true)
|
||||
const discordMsg = cleanMessage
|
||||
.replaceAll('@', '@\u200b')
|
||||
.replaceAll('http', 'http\u200b')
|
||||
.replaceAll('\u001b[9', '\u001b[3')
|
||||
*/
|
||||
function sendComponent (message) {
|
||||
const ansi = bot.getMessageAsPrismarine(message).toAnsi().replaceAll('\u001b[9', '\u001b[3')
|
||||
|
||||
const lang = require('../lolus.json')
|
||||
const ansi = bot.getMessageAsPrismarine(message).toAnsi().replaceAll('```\u001b[9```' + '```\u001b[3```') // I have a function to fix ansi :shrug:
|
||||
|
||||
/*
|
||||
would it be better to do
|
||||
```
|
||||
@@ -53,10 +74,8 @@ function inject (bot, options) {
|
||||
message2
|
||||
message3...
|
||||
```
|
||||
|
||||
instead of
|
||||
|
||||
```
|
||||
and not
|
||||
```
|
||||
message1
|
||||
```
|
||||
````
|
||||
@@ -64,11 +83,24 @@ function inject (bot, options) {
|
||||
````
|
||||
````
|
||||
message3...
|
||||
```?
|
||||
```
|
||||
*/
|
||||
sendDiscordMessage('```ansi\n' + ansi.replaceAll('`', '\u200b`').substring(0, 2000) + '\n```')
|
||||
}
|
||||
|
||||
|
||||
const now = new Date().toLocaleString("en-US",{timeZone:"America/CHICAGO"})
|
||||
try {
|
||||
sendDiscordMessage('```ansi\n' + fixansi(ansi.replaceAll('\u200b`').substring(0, 1983)) + '\n```')
|
||||
|
||||
} catch (e) {
|
||||
//i was gonna try to get it to debug via console
|
||||
console.error(`Error sending a message to Discord:\n${e.message}`)
|
||||
//already tried ansi
|
||||
}//send isnt defined
|
||||
} // its still doing the ansi crap
|
||||
//;/
|
||||
//wait a min it shows smh about unable to read properties of undefined (reading 'send') in the console or smh on startup
|
||||
// its the messages it sending read lines 69 to 86
|
||||
// i see
|
||||
bot.on('message', message => {
|
||||
sendComponent(message)
|
||||
})
|
||||
@@ -89,30 +121,31 @@ function inject (bot, options) {
|
||||
}
|
||||
|
||||
bot.tellraw({
|
||||
translate: '[%s] %s: %s',
|
||||
translate: '[%s] %s \u203a %s',
|
||||
with: [
|
||||
{
|
||||
translate: '%s%s%s %s',
|
||||
bold:false,
|
||||
with: [
|
||||
{
|
||||
text: 'FNF',
|
||||
bold: true,
|
||||
bold: false,
|
||||
color: 'dark_purple'
|
||||
},
|
||||
{
|
||||
text: 'Boyfriend',
|
||||
bold: true,
|
||||
bold: false,
|
||||
color: 'aqua'
|
||||
},
|
||||
{
|
||||
text: 'Bot',
|
||||
bold: true,
|
||||
bold: false,
|
||||
color: 'dark_red'
|
||||
},
|
||||
|
||||
{
|
||||
text: 'Discord',
|
||||
bold: true,
|
||||
bold: false,
|
||||
color: 'blue'
|
||||
}
|
||||
],
|
||||
@@ -125,6 +158,40 @@ function inject (bot, options) {
|
||||
})
|
||||
}
|
||||
client.on('messageCreate', messageCreate)
|
||||
bot.on('end', (error) => {
|
||||
|
||||
sendDiscordMessage(`\`\`\`ansi\nDisconnected: ${'error', console.error}\n\`\`\``)
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
function fixansi(message) {
|
||||
const ansilist = {
|
||||
"\x1B\[93m": "\x1B[33m", // Yellow
|
||||
"\x1B\[96m": "\x1B[36m", // Blue
|
||||
"\x1B\[94m": "\x1B[34m", // Discord Blue
|
||||
"\x1B\[90m": "\x1B[30m", // Gray
|
||||
"\x1B\[91m": "\x1B[31m", // Light Red
|
||||
"\x1B\[95m": "\x1B\[35m", // Pink
|
||||
"\x1B\[92m": "\x1B\[32m", // Green
|
||||
"\x1B\[0m": "\x1B\[0m\x1B\[37m", // White
|
||||
"\x1B\[97m": "\x1B\[0m\x1B\[37m", // White
|
||||
};
|
||||
let i = message;
|
||||
|
||||
for (const ansi in ansilist) {
|
||||
if (ansilist.hasOwnProperty(ansi)) {
|
||||
i = i.replace(new RegExp(escapeRegExpChars(ansi), 'g'), ansilist[ansi]);
|
||||
|
||||
function escapeRegExpChars(text) {
|
||||
return text.replace(/[-\/\\^$*+?.()|[\]{}]/g, '\\$&');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return i;
|
||||
}
|
||||
|
||||
//
|
||||
module.exports = inject
|
||||
|
||||
+25
-58
@@ -1,63 +1,30 @@
|
||||
// * Not real hashing
|
||||
const crypto = require('crypto')
|
||||
|
||||
let _hash = generateHash()
|
||||
|
||||
const ownerkey = process.env['FNFBoyfriendBot_Owner_key']
|
||||
const key = process.env['FNFBoyfriendBot_key']
|
||||
function inject (bot) {
|
||||
bot.hashing = {
|
||||
_hash: crypto.randomBytes(4).toString('hex').substring(0,16),
|
||||
//const key = process.env['FNFBoyfriendBotX_key']
|
||||
get hash () { return this._hash },
|
||||
set hash (value) {
|
||||
this._hash = value
|
||||
this.discordChannel?.send('```ansi\n Hash for server ' + `${bot.options.host}:${bot.options.port}: ${value}` + '\n```')
|
||||
},
|
||||
//`Hash for server ${bot.options.host}:${bot.options.port}: ${value}`
|
||||
generateHash () {
|
||||
return crypto.randomBytes(4).toString('hex').substring(0, 16)
|
||||
},
|
||||
|
||||
updateHash () {
|
||||
this.hash = this.generateHash()
|
||||
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)
|
||||
})
|
||||
}
|
||||
|
||||
bot.discord.client?.on('ready', () => {
|
||||
bot.hashing.discordChannel = bot.discord.client.channels.cache.get('1120122720001208390')
|
||||
bot.hashing.discordChannel?.send('```ansi\n Hash for server ' + `${bot.options.host}:${bot.options.port}: ` + bot.hashing.hash + '\n```')
|
||||
})// + bot.hashing.hash
|
||||
}//`Hash for server ${bot.options.host}:${bot.options.port}: ${value}`
|
||||
//nvm what?
|
||||
function generateHash () {
|
||||
return crypto.randomBytes(4).toString('hex')
|
||||
}
|
||||
//discord channel id:1120122720001208390
|
||||
module.exports = inject
|
||||
/*
|
||||
const crypto = require('crypto')
|
||||
|
||||
async function inject (bot) {
|
||||
bot.hashing = {
|
||||
_hash: crypto.randomBytes(4).toString('hex').substring(0,16),
|
||||
//const key = process.env['FNFBoyfriendBotX_key']
|
||||
get hash () { return this._hash },
|
||||
set hash (value) {
|
||||
const channel = bot.discord.client.channels.cache.get('1120122720001208390')
|
||||
|
||||
this._hash = value
|
||||
bot.hashingdiscordChannel?.send(`Hash for server ${bot.options.host}:${bot.options.port}: ${value}`)
|
||||
},
|
||||
|
||||
generateHash,
|
||||
|
||||
updateHash () {
|
||||
this.hash = this.generateHash()
|
||||
}
|
||||
}
|
||||
|
||||
bot.discord.client?.on('ready', () => {
|
||||
bot.hashing.discordChannel = bot.discord.client.channels.cache.get('1120122720001208390')
|
||||
bot.hashing.discordChannel?.send(`Hash for server ${bot.options.host}:${bot.options.port}: ` + bot.hashing.hash)
|
||||
})
|
||||
}
|
||||
*/
|
||||
module.exports = inject
|
||||
@@ -1,6 +1,6 @@
|
||||
function inject (bot) {
|
||||
bot.players = []
|
||||
|
||||
//chayapak you mentally ok?
|
||||
bot.on('packet.player_info', packet => {
|
||||
const actions = []
|
||||
|
||||
|
||||
@@ -1,14 +1,16 @@
|
||||
const mc = require('minecraft-protocol')
|
||||
|
||||
function inject (bot, options) {
|
||||
bot.reconnectDelay = options.reconnectDelay ?? 1000
|
||||
function reconnect (bot, options) {
|
||||
bot.reconnectDelay = options.reconnectDelay ?? 5200 // Set from 1000 to 5200 - yfd
|
||||
|
||||
bot.on('end', () => {
|
||||
if (bot.reconnectDelay < 0) return
|
||||
|
||||
bot._client = mc.createClient(options)
|
||||
bot.emit('init_client', bot._client)
|
||||
setTimeout(() => {
|
||||
bot._client = mc.createClient(options)
|
||||
bot.emit('init_client', bot._client)
|
||||
}, bot.reconnectDelay)
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = inject
|
||||
module.exports = reconnect
|
||||
@@ -1,59 +0,0 @@
|
||||
const util = require('util')
|
||||
|
||||
const COMMANDSPY_ENABLED_MESSAGE = { text: 'Successfully enabled CommandSpy' }
|
||||
const COMMANDSPY_DISABLED_MESSAGE = { text: 'Successfully disabled CommandSpy' }
|
||||
|
||||
function inject (bot) {
|
||||
let entityId
|
||||
let gameMode
|
||||
let permissionLevel = 2
|
||||
|
||||
let commandSpyEnabled = false
|
||||
let vanished = false
|
||||
|
||||
bot.on('message', message => {
|
||||
if (util.isDeepStrictEqual(message, COMMANDSPY_ENABLED_MESSAGE)) commandSpyEnabled = true
|
||||
else if (util.isDeepStrictEqual(message, COMMANDSPY_DISABLED_MESSAGE)) commandSpyEnabled = 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
|
||||
|
||||
if (suffix.text?.endsWith(': enabled')) vanished = true
|
||||
else if (suffix.text?.endsWith(': disabled')) vanished = false
|
||||
})
|
||||
|
||||
bot.on('packet.entity_status', packet => {
|
||||
if (packet.entityId !== entityId || packet.entityStatus < 24 || packet.entityStatus > 28) return
|
||||
permissionLevel = packet.entityStatus - 24
|
||||
})
|
||||
|
||||
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 (gameMode !== 1) bot.command('gamemode creative @s[type=player]')
|
||||
}, 200)
|
||||
})
|
||||
|
||||
bot.on('end', () => {
|
||||
if (timer) clearInterval(timer)
|
||||
|
||||
commandSpyEnabled = false
|
||||
vanished = false
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = inject
|
||||
@@ -0,0 +1,97 @@
|
||||
|
||||
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 ~')
|
||||
})
|
||||
}*/
|
||||
@@ -0,0 +1,13 @@
|
||||
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
|
||||
Generated
+2864
-1397
File diff suppressed because it is too large
Load Diff
+16
-13
@@ -1,20 +1,23 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"discord.js": "^14.11.0",
|
||||
"illegal-symbols": "^1.0.0",
|
||||
"jvm": "^0.5.3",
|
||||
"man-db": "^1.0.3",
|
||||
"minecraft-data": "^3.36.1",
|
||||
"minecraft-packets": "^1.5.0",
|
||||
"@tonejs/midi": "^2.0.28",
|
||||
"@vitalets/google-translate-api": "^9.2.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.10.1",
|
||||
"mineflayer-cmd": "^1.1.3",
|
||||
"prismarine-auth": "^2.2.0",
|
||||
"prismarine-chat": "^1.8.0",
|
||||
"prismarine-registry": "^1.7.0",
|
||||
"mineflayer": "^4.14.0",
|
||||
"moment-timezone": "^0.5.43",
|
||||
"node_characterai": "^1.1.3",
|
||||
"prismarine-chat": "^1.9.1",
|
||||
"randomstring": "^1.3.0",
|
||||
"sleep-promise": "^9.1.0",
|
||||
"readline": "^1.3.0",
|
||||
"sharp": "^0.32.6",
|
||||
"urban-dictionary": "^3.0.2",
|
||||
"vm2": "^3.9.19"
|
||||
"uuid-by-string": "^4.0.0",
|
||||
"vm2": "^3.9.19",
|
||||
"vm2-fixed": "^0.0.1",
|
||||
"wikipedia": "^2.1.1"
|
||||
}
|
||||
}
|
||||
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
function inject (bot, context) {
|
||||
|
||||
const buildstring = process.env['buildstring']
|
||||
const util = require('node:util')
|
||||
// bot.discord.channel.send('')
|
||||
bot.console.info(
|
||||
`Disconnected from ${bot.server.host} (${event} event): ${util.inspect(reason)}`
|
||||
)
|
||||
|
||||
|
||||
let timeout = options.reconnectTimeout
|
||||
|
||||
try {
|
||||
if (reason.text) {
|
||||
if (reason.text ===
|
||||
'Wait 5 seconds before connecting, thanks! :)' ||
|
||||
reason.text ===
|
||||
'You are logging in too fast, try again later.'
|
||||
) timeout = 1000 * 7
|
||||
}
|
||||
} catch (e) {
|
||||
bot.console.error(e)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = inject
|
||||
@@ -0,0 +1,16 @@
|
||||
function escapeMarkdown (text, zwsp) {
|
||||
let unescaped
|
||||
let escaped
|
||||
try {
|
||||
unescaped = text.replace(/\\(\*|@|_|`|~|\\)/g, '$1')
|
||||
escaped = unescaped.replace(/(\*|@|_|`|~|\\)/g, zwsp
|
||||
? '\u200b\u200b$1'
|
||||
: '\\$1'
|
||||
)
|
||||
} catch (e) {
|
||||
return unescaped
|
||||
}
|
||||
return escaped
|
||||
}
|
||||
//fr
|
||||
module.exports = { escapeMarkdown } // ohio
|
||||
@@ -0,0 +1,44 @@
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const CommandError = require('../CommandModules/command_error.js')
|
||||
|
||||
async function inject (bot, options) {
|
||||
|
||||
for (const filename of fs.readdirSync(path.join(__dirname, '../commands'))) {
|
||||
try {
|
||||
const command = require(path.join(__dirname, '../commands', filename))
|
||||
bot.files.register(command)
|
||||
|
||||
} else {
|
||||
for (const filename of fs.readdirSync(path.join(__dirname, '../'))) {
|
||||
try {
|
||||
const util = require(path.join(__dirname, './util', filename))
|
||||
bot.files.register(util)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = inject
|
||||
/*const fs = require('fs/promises')
|
||||
const path = require('path')
|
||||
|
||||
|
||||
async function loadPlugins (directory) {
|
||||
const plugins = []
|
||||
|
||||
for (const filename of await fs.readdir(directory)) {
|
||||
if (!filename.endsWith('.js')) continue
|
||||
|
||||
const filepath = path.join(directory, filename)
|
||||
|
||||
const plugin = require(filepath)
|
||||
|
||||
plugins.push(plugin)
|
||||
}
|
||||
|
||||
return plugins
|
||||
}
|
||||
|
||||
module.exports = loadPlugins
|
||||
*/
|
||||
-26
@@ -1,26 +0,0 @@
|
||||
mconst CommandError = require('../CommandModules/command_error')
|
||||
function hash() {
|
||||
const crypto = require("crypto");
|
||||
var hash = crypto.createHash("md5");
|
||||
var randomBytes = crypto.randomBytes(6);
|
||||
hash.update(randomBytes);
|
||||
var hashi = hash.digest(Math.round(Math.random()) ? "hex" : "Base64");
|
||||
|
||||
return hashi.substring(0, 6);
|
||||
}
|
||||
module.exports = {
|
||||
name: 'validate',
|
||||
execute (context) {
|
||||
const hashList = []
|
||||
for (const hash of context.bothash.hash()) {
|
||||
if (commandList.length !== 0) hash.push(' ')
|
||||
|
||||
}
|
||||
|
||||
const length = context.bot.botha.gethash().length
|
||||
|
||||
|
||||
context.source.sendFeedback(['hash (', length, ') '], false)
|
||||
}
|
||||
}
|
||||
//channel id 1120122720001208390
|
||||
Reference in New Issue
Block a user