mirror of
https://code.chipmunk.land/Parker2991/NitoriBot/
synced 2026-12-01 06:35:41 -05:00
Compare commits
1
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
692915e5e1 |
@@ -1,75 +0,0 @@
|
||||
const mc = require('minecraft-protocol')
|
||||
const { EventEmitter } = require('node:events')
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const util = require('node:util')
|
||||
|
||||
function createBot(options = {}) {
|
||||
const bot = new EventEmitter()
|
||||
const rs = require('randomstring')
|
||||
// Set some default values in options
|
||||
let r = Math.floor(Math.random() * 255) + 1;
|
||||
options.host ??= 'localhost'
|
||||
options.username ??= 'Player' + Math.floor(Math.random() * 1000)
|
||||
options.hideErrors ??= false // HACK: Hide errors by default as a lazy fix to console being spammed with them
|
||||
|
||||
bot.options = options
|
||||
|
||||
// Create our client object, put it on the bot, and register some events
|
||||
bot.on('init_client', client => {
|
||||
client.on('packet', (data, meta) => {
|
||||
bot.emit('packet', data, meta)
|
||||
bot.emit('packet.' + meta.name, data)
|
||||
})
|
||||
|
||||
client.on('login', async function (data) {
|
||||
|
||||
bot.uuid = client.uuid
|
||||
bot.username = client.username
|
||||
bot.entityId = data.entityId
|
||||
bot.host = bot.options.host
|
||||
bot.port = bot.options.port
|
||||
bot.buildstring = process.env['buildstring']
|
||||
bot.fbs = process.env['FoundationBuildString']
|
||||
})
|
||||
|
||||
client.on('end', reason => { bot.emit('end', reason)
|
||||
try {
|
||||
if (reason.text) {
|
||||
if
|
||||
}
|
||||
}
|
||||
})if
|
||||
|
||||
client.on('error', error => bot.emit('error', error), )
|
||||
|
||||
})
|
||||
|
||||
const buildstring = process.env['buildstring']
|
||||
|
||||
const client = options.client ?? mc.createClient(options)
|
||||
bot._client = client
|
||||
bot.emit('init_client', client)
|
||||
|
||||
bot.bots = options.bots ?? [bot]
|
||||
|
||||
// Modules
|
||||
bot.loadModule = module => module(bot, options)
|
||||
|
||||
for (const filename of fs.readdirSync(path.join(__dirname, 'modules'))) {
|
||||
try {
|
||||
const module = require(path.join(__dirname, 'modules', filename))
|
||||
bot.loadModule(module)
|
||||
} catch (error) {
|
||||
|
||||
console.error('\x1b[0m\x1b[91m[ERROR]: \x1b[0m\x1b[90mFailed to load module', filename, ':', error)
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return bot
|
||||
}
|
||||
|
||||
// ABot username function mabe mabe
|
||||
|
||||
module.exports = createBot
|
||||
@@ -1,18 +1,12 @@
|
||||
class CommandSource {
|
||||
constructor (player, sources, hash, owner, discordMessageEvent = null, consoleOnly, name, profile, bot) {//this worked just fine in v4.3.4
|
||||
//does it get defined in discord thingy wherever dat is
|
||||
// sus
|
||||
|
||||
constructor (player, sources, hash = false, owner = false, discordMessageEvent = null, consoleOnly = sources) {
|
||||
this.player = player
|
||||
|
||||
this.sources = sources
|
||||
this.profile = bot
|
||||
this.hash = hash
|
||||
|
||||
this.owner = owner
|
||||
this.consoleOnly = consoleOnly
|
||||
this.discordMessageEvent = discordMessageEvent
|
||||
|
||||
this.displayName = player
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
const mc = require('minecraft-protocol')
|
||||
const { EventEmitter } = require('node:events')
|
||||
const { EventEmitter } = require('events')
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const util = require('node:util')
|
||||
console.log(`Starting ${process.env["buildstring"]} .......`)
|
||||
console.log(`Foundation: ${process.env["FoundationBuildString"]}`)
|
||||
console.log('this may take a few moments....')
|
||||
require('events').EventEmitter.defaultMaxListeners = 20;
|
||||
|
||||
function createBot(options = {}) {
|
||||
const bot = new EventEmitter()
|
||||
const rs = require('randomstring')
|
||||
@@ -17,14 +17,7 @@ const rs = require('randomstring')
|
||||
options.hideErrors ??= false // HACK: Hide errors by default as a lazy fix to console being spammed with them
|
||||
options.console ??= true
|
||||
options.input ??= true
|
||||
//options.logger ??= true
|
||||
// MainPrefix: "~",
|
||||
// SecondaryPrefix:'%',
|
||||
//TertiaryPrefix:'@'
|
||||
|
||||
options.commands.MainPrefix ??= '!'
|
||||
options.commands.SecondaryPrefix ??= '!'
|
||||
options.commands.TertiaryPrefix ??= '!'
|
||||
|
||||
options.selfcare.unmuted ??= true
|
||||
|
||||
options.selfcare.vanished ??= true
|
||||
@@ -43,7 +36,7 @@ options.input ??= true
|
||||
|
||||
options.Core.core ??= true
|
||||
|
||||
|
||||
options.commands.prefix ??= '!'
|
||||
|
||||
options.discord.commandPrefix ??= '!'
|
||||
|
||||
@@ -77,44 +70,23 @@ options.input ??= true
|
||||
bot.buildstring = process.env['buildstring']
|
||||
bot.fbs = process.env['FoundationBuildString']
|
||||
bot.version = bot.options.version
|
||||
console.log(`Username: ${bot.options.username}`)
|
||||
console.log(`Host: ${bot.options.host}:${bot.options.port}`)
|
||||
console.log(`Minecraft java version: ${bot.options.version}`)
|
||||
/* console.log(`Username: ${bot.username}`)
|
||||
console.log(`Username: ${bot.username}`)
|
||||
console.log(`Host: ${bot.host}:${bot.port}`)
|
||||
console.log(`Minecraft java version: ${bot.version}`)*/
|
||||
console.log(`Minecraft java version: ${bot.version}`)
|
||||
})
|
||||
//reason, fullReason
|
||||
//bot.visibility = false
|
||||
client.on('end', reason => { bot.emit('end', reason)
|
||||
//console.log(util.inspect(reason))
|
||||
|
||||
|
||||
})
|
||||
client.on('disconnect', reason => {
|
||||
bot.emit('disconnect', reason)
|
||||
//console.log(reason)
|
||||
})
|
||||
|
||||
client.on('kick_disconnect', reason => {
|
||||
bot.emit('kick_disconnect', reason)
|
||||
console.log(reason)
|
||||
})
|
||||
client.on('keep_alive', ({ keepAliveId }) => {
|
||||
client.on('end', reason => { bot.emit('end', reason)
|
||||
|
||||
})
|
||||
/*client.on('keep_alive', ({ keepAliveId }) => {
|
||||
bot.emit('keep_alive', { keepAliveId })
|
||||
|
||||
})
|
||||
|
||||
})*/
|
||||
client.on('error', error => bot.emit('error', error), )
|
||||
|
||||
//client.end(reason, fullReason)
|
||||
|
||||
})
|
||||
/*
|
||||
bot._client.on('kick_disconnect', (data) => {
|
||||
const parsed = JSON.parse(data.reason)
|
||||
bot.end(parsed, 'kick_disconnect')
|
||||
})
|
||||
|
||||
*/
|
||||
const buildstring = process.env['buildstring']
|
||||
|
||||
const client = options.client ?? mc.createClient(options)
|
||||
@@ -122,8 +94,8 @@ const buildstring = process.env['buildstring']
|
||||
bot.emit('init_client', client)
|
||||
|
||||
bot.bots = options.bots ?? [bot]
|
||||
//bot.setMaxListeners(Infinity)
|
||||
//bot._client.setMaxListeners(Infinity)
|
||||
bot.setMaxListeners(Infinity)
|
||||
bot._client.setMaxListeners(Infinity)
|
||||
|
||||
// Modules
|
||||
bot.loadModule = module => module(bot, options)
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
function parseMessage (message, data, context) {
|
||||
try{
|
||||
if (message === null || typeof message !== 'object') return
|
||||
|
||||
if (message.with?.length < 2 || (message.translate !== 'chat.type.emote' && message.translate !== '%s %s')) return
|
||||
@@ -27,8 +26,6 @@ function parseMessage (message, data, context) {
|
||||
if (!sender) return undefined
|
||||
|
||||
return { sender, contents, type: 'minecraft:chat', senderComponent }
|
||||
}catch(e){
|
||||
console.log(e.stack)
|
||||
}
|
||||
}
|
||||
module.exports = parseMessage
|
||||
|
||||
module.exports = parseMessage
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
function parseMessage (message, data, context) {
|
||||
try {
|
||||
if (message === null || typeof message !== 'object') return
|
||||
if (message === null || typeof message !== 'object') return
|
||||
|
||||
if (message.with?.length < 2 || (message.translate !== 'chat.type.text' && message.translate !== '%s %s')) return
|
||||
|
||||
@@ -27,8 +26,6 @@ try {
|
||||
if (!sender) return undefined
|
||||
|
||||
return { sender, contents, type: 'minecraft:chat', senderComponent }
|
||||
}catch(e){
|
||||
console.log(e.stack)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = parseMessage
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
function inject (bot, options) {
|
||||
bot.chatQueue = []
|
||||
bot._chatQueue = []
|
||||
|
||||
const _chatQueueInterval = setInterval(() => {
|
||||
if (bot.chatQueue.length !== 0) {
|
||||
if (containsIllegalCharacters(bot.chatQueue[0])) {
|
||||
bot.chatQueue.shift()
|
||||
return
|
||||
};
|
||||
|
||||
for (const subMessage of bot.chatQueue[0].split('\n')) {
|
||||
if (!subMessage) return
|
||||
let smallMsg
|
||||
for (let i = 0; i < subMessage.length; i += config.chat.messageLength) {
|
||||
smallMsg = subMessage.substring(i, i + config.chat.messageLength)
|
||||
bot._chatQueue.push(smallMsg)
|
||||
}
|
||||
}
|
||||
bot.chatQueue.shift()
|
||||
}
|
||||
}, 0)
|
||||
const chatQueueInterval = setInterval(function () {
|
||||
if (bot._chatQueue.length !== 0) {
|
||||
if (bot._chatQueue[0].startsWith('/') && minecraftVersionToNumber(bot.version) >= 1.20) {
|
||||
|
||||
} else {
|
||||
bot._client.chat(bot._chatQueue[0])
|
||||
}
|
||||
|
||||
bot._chatQueue.shift()
|
||||
}
|
||||
}, 450)
|
||||
bot.chat = (message) => {
|
||||
bot.chatQueue.push(String(message))
|
||||
}
|
||||
|
||||
bot.on('end', () => {
|
||||
clearInterval(chatQueueInterval)
|
||||
clearInterval(_chatQueueInterval)
|
||||
})
|
||||
|
||||
function listener (packet) {
|
||||
chatPacketListener(
|
||||
packet,
|
||||
bot,
|
||||
minecraftVersionToNumber(bot.version) >= 1.20
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = inject
|
||||
|
||||
@@ -3,8 +3,9 @@ const CommandError = require('../CommandModules/command_error')
|
||||
module.exports = {
|
||||
name: 'botdevhistory',
|
||||
description:['bots dev history'],
|
||||
|
||||
trustLevel: 0,
|
||||
hashOnly:false,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
execute (context) {
|
||||
|
||||
const message = context.arguments.join(' ')
|
||||
|
||||
+3
-1
@@ -196,7 +196,9 @@ module.exports = {
|
||||
name: 'bots',
|
||||
description:['shows a list of known bots'],
|
||||
aliases:['knownbots'],
|
||||
trustLevel: 0,
|
||||
hashOnly:false,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
execute (context) {
|
||||
const query = context.arguments.join(' ').toLowerCase()
|
||||
const bot = context.bot
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
module.exports = {
|
||||
name: 'botsrun',
|
||||
description:[''],
|
||||
aliases:[],
|
||||
trustLevel: 2,
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
// const client = context.client
|
||||
const args = context.arguments
|
||||
const source = context.source
|
||||
const message = context.arguments.join(' ')
|
||||
//const source = context.source
|
||||
// if (args.length === 0){
|
||||
//source.sendFeedback({translate:"Too few Arguments!", color:"red"})
|
||||
const amogus = args.slice(1).join(' ');
|
||||
if (!args && !args[0] && !args[1] && !args[2]) return
|
||||
try{
|
||||
switch (args[1]) {
|
||||
case 'source':
|
||||
|
||||
for (const eachBot of bot.bots) {
|
||||
eachBot.commandManager.executeString(source, `${args.slice(2).join(' ')} `)
|
||||
}
|
||||
break
|
||||
case 'consolesource':
|
||||
|
||||
for (const eachBot of bot.bots) {
|
||||
eachBot.commandManager.executeString(bot.console.source, `${args.slice(2).join(' ')} `)
|
||||
}
|
||||
break
|
||||
default:
|
||||
context.source.sendError([ { text: 'Invalid action', color: 'dark_red', bold:false }])
|
||||
source.sendFeedback({text:'Args are source and consolesource', color:'green'})
|
||||
}
|
||||
|
||||
}catch(error){
|
||||
source.sendFeedback(error.stack)
|
||||
}
|
||||
// context.source.sendFeedback({ text: util.inspect(eval(script), { stylize }).substring(0, 32700) })
|
||||
|
||||
|
||||
}//
|
||||
}
|
||||
+3
-1
@@ -4,7 +4,9 @@ module.exports = {
|
||||
name: 'bruhify',
|
||||
description:['bruhify text'],
|
||||
aliases:['bruhifytext', 'bruh'],
|
||||
trustLevel: 0,
|
||||
hashOnly:false,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const args = context.arguments
|
||||
|
||||
@@ -2,7 +2,9 @@ const CommandError = require('../CommandModules/command_error')
|
||||
module.exports = {
|
||||
name: 'calculator',
|
||||
description:['calculate maths'],
|
||||
trustLevel: 0,
|
||||
hashOnly:false,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
aliases:['calc'],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
|
||||
+324
-20
@@ -1,34 +1,336 @@
|
||||
|
||||
const bots = [
|
||||
{//
|
||||
name: { text: 'v5.0.0-Beta', color: 'blue', bold:false },
|
||||
authors: ['Monochrome'],
|
||||
{
|
||||
name: { text: 'v0.1.0 - v0.5.0-beta', color: 'blue', bold:false },
|
||||
authors: ['Prototypes'],
|
||||
|
||||
foundation: '12/18/23',
|
||||
exclaimer:'added owner validation to the bot thats about it',
|
||||
foundation: '11/22/22 - 1/24/23',
|
||||
exclaimer:'ehh nothing much just the release of the betas',
|
||||
},
|
||||
{//
|
||||
name: { text: 'v5.0.0', color: 'dark_red', bold:false },
|
||||
authors: ['Monochrome'],
|
||||
{
|
||||
name: { text: 'v1.0.0-beta', color: 'blue', bold:false },
|
||||
authors: ['in console test'],
|
||||
|
||||
foundation: '12/20/23',
|
||||
exclaimer:'since the old validation system was able to barely handle owner validation it was completely remove and replaced with trust levels which handle validation way better also added command aliases (shoutouts to poopbob with the command aliases). made a whole new changelog command for v5.0.0 and renamed the old one changelogv4.3.4. also fixed the issue with the console not properly refreshing lines that are sent',
|
||||
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: 'v5.0.1', color: 'green', bold:false },
|
||||
{
|
||||
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: 'added botsrun for the funni along with making the bot be able to auto refill its core now and fill the core from a command block(edit: nevermind its very buggy reverting it back to how it originally filled its core) and adding a hover event to netmsg along with having the test command tellraw the players display name in the command and added support for 3 command prefixes',
|
||||
exclaimer:'12/23/23',
|
||||
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: 'v5.0.2', color: 'green', bold:false },
|
||||
{
|
||||
name: { text: 'v1.1.0', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '12/26/23',
|
||||
exclaimer:'fixed the issue with the cpu checking in the info command added discord hashing back into the bot to work along side the keys made it check to see if the config file is in the directory and if not it will recreate the config from default.js',
|
||||
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: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '10/12/23',
|
||||
exclaimer:'rewrote evaljs its now using isolated-vm and not vm2',
|
||||
},
|
||||
{//
|
||||
name: { text: 'v4.2.0-restore', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '10/19/23',
|
||||
exclaimer:'fixed the disconnect message for discord and the bug with the say command',
|
||||
},
|
||||
{//
|
||||
name: { text: 'v4.2.1', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '10/24/23',
|
||||
exclaimer:'rewrote the help command to allow descriptions finally along with adding things to the base of the bot for the descriptions',
|
||||
},
|
||||
{//
|
||||
name: { text: 'v4.2.2', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '10/25/23',
|
||||
exclaimer:'merged serverinfo, memused, discord, logininfo, creators, version, uptime together',
|
||||
},
|
||||
{//
|
||||
name: { text: 'v4.2.3', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '10/30/23',
|
||||
exclaimer:'added a antiskid measure (thanks _yfd)',
|
||||
},
|
||||
{//
|
||||
name: { text: 'v4.2.4', color: 'green', bold:false },
|
||||
authors: ['Spooky update (note: might as well give it a codename since its halloween)'],
|
||||
|
||||
foundation: '10/31/23',
|
||||
exclaimer:'merged fard and reconnect together making recend, added more crash methods to the crash command, and remove 12 commands',
|
||||
},
|
||||
{//
|
||||
name: { text: 'v4.2.5', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '11/8/23',
|
||||
exclaimer:'patched the exploit in the discordmsg command and made it to were with the netmsg command players cannot send empty messages',
|
||||
},
|
||||
{//
|
||||
name: { text: 'v4.3.0', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '11/16/23',
|
||||
exclaimer:`color coded the console logs are LOGS in the color gold consoleserver are in the category INFO in the color green, errors after start up are in the category WARN in the color yellow, Fatal Errors/start-up errors are in the category ERROR in the color red and hashs/validation codes sent to console are in the category HASH in the color green. added the command servereval. changed config.json to config.js and moved the username() function from the end of bot.js to the end of config.js and replacing where username() after options.username with 'Player' + Math.floor(Math.random() * 1000) and added player ping/latency to list along with fixing the bug with cloop list`,
|
||||
},
|
||||
{//
|
||||
name: { text: 'v4.3.1', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '11/21/23 one day till the bots anniversary?!?!',
|
||||
exclaimer:'modified the bots boot originally it would spam the bots buildstring each time it logged into a server on boot but now it will only send it once to console on boot along with it now sending the foundationbuildstring after the buildstring sent in console. ported some commands over since chomens is pretty much dead along with adding chat support for chat.type.text and chat.type.emote',
|
||||
},
|
||||
{//
|
||||
name: { text: 'v4.3.2', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '11/23/23',
|
||||
exclaimer:'made the bots selfcare, the selfcares interval and console toggle-able along with making default options for the selfcare and its interval, the bots prefix, the bots discord prefix, the reconnectDelay interval, the core customname, and the console, partically fixed the issue with the trusted commands no being able to be ran in discord, edited the bots boot again it now also logs the amount of files its loading on boot its discord username its logged in with(also added the discord username to the info command)',
|
||||
},
|
||||
{//
|
||||
name: { text: 'v4.3.3', color: 'dark_red', bold:false },
|
||||
authors: ["Lullaby Girlfriend's LostCause"],
|
||||
|
||||
foundation: '12/3/23',
|
||||
exclaimer:'added hover events to the help command for command descriptions, trust console and name along with click events for them added memusage and fixed the category issue with the console and added toggles to the bot for console, selfcare, and skin',
|
||||
},
|
||||
{//
|
||||
name: { text: 'v4.3.4', color: 'dark_red', bold:false },
|
||||
authors: ['Suffering Siblings'],
|
||||
|
||||
foundation: '12/12/23',
|
||||
exclaimer:'overhauled the console and discord relay chat fixing trusted roles and making the selfcare toggleable in game also fixing the issue with hiding console only commands (thank you poopbob for helping me with that)',
|
||||
},
|
||||
]//§4Lullaby §cGirlfriend's §cLost§bCause
|
||||
//back
|
||||
|
||||
|
||||
@@ -42,7 +344,9 @@ const bots = [
|
||||
module.exports = {
|
||||
name: 'changelog',
|
||||
description:['check the bots changelog'],
|
||||
trustLevel: 0,
|
||||
hashOnly:false,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
aliases:['cl', 'changes'],
|
||||
execute (context) {
|
||||
const query = context.arguments.join(' ').toLowerCase()
|
||||
|
||||
@@ -1,409 +0,0 @@
|
||||
|
||||
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: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '10/12/23',
|
||||
exclaimer:'rewrote evaljs its now using isolated-vm and not vm2',
|
||||
},
|
||||
{//
|
||||
name: { text: 'v4.2.0-restore', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '10/19/23',
|
||||
exclaimer:'fixed the disconnect message for discord and the bug with the say command',
|
||||
},
|
||||
{//
|
||||
name: { text: 'v4.2.1', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '10/24/23',
|
||||
exclaimer:'rewrote the help command to allow descriptions finally along with adding things to the base of the bot for the descriptions',
|
||||
},
|
||||
{//
|
||||
name: { text: 'v4.2.2', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '10/25/23',
|
||||
exclaimer:'merged serverinfo, memused, discord, logininfo, creators, version, uptime together',
|
||||
},
|
||||
{//
|
||||
name: { text: 'v4.2.3', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '10/30/23',
|
||||
exclaimer:'added a antiskid measure (thanks _yfd)',
|
||||
},
|
||||
{//
|
||||
name: { text: 'v4.2.4', color: 'green', bold:false },
|
||||
authors: ['Spooky update (note: might as well give it a codename since its halloween)'],
|
||||
|
||||
foundation: '10/31/23',
|
||||
exclaimer:'merged fard and reconnect together making recend, added more crash methods to the crash command, and remove 12 commands',
|
||||
},
|
||||
{//
|
||||
name: { text: 'v4.2.5', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '11/8/23',
|
||||
exclaimer:'patched the exploit in the discordmsg command and made it to were with the netmsg command players cannot send empty messages',
|
||||
},
|
||||
{//
|
||||
name: { text: 'v4.3.0', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '11/16/23',
|
||||
exclaimer:`color coded the console logs are LOGS in the color gold consoleserver are in the category INFO in the color green, errors after start up are in the category WARN in the color yellow, Fatal Errors/start-up errors are in the category ERROR in the color red and hashs/validation codes sent to console are in the category HASH in the color green. added the command servereval. changed config.json to config.js and moved the username() function from the end of bot.js to the end of config.js and replacing where username() after options.username with 'Player' + Math.floor(Math.random() * 1000) and added player ping/latency to list along with fixing the bug with cloop list`,
|
||||
},
|
||||
{//
|
||||
name: { text: 'v4.3.1', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '11/21/23 one day till the bots anniversary?!?!',
|
||||
exclaimer:'modified the bots boot originally it would spam the bots buildstring each time it logged into a server on boot but now it will only send it once to console on boot along with it now sending the foundationbuildstring after the buildstring sent in console. ported some commands over since chomens is pretty much dead along with adding chat support for chat.type.text and chat.type.emote',
|
||||
},
|
||||
{//
|
||||
name: { text: 'v4.3.2', color: 'green', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '11/23/23',
|
||||
exclaimer:'made the bots selfcare, the selfcares interval and console toggle-able along with making default options for the selfcare and its interval, the bots prefix, the bots discord prefix, the reconnectDelay interval, the core customname, and the console, partically fixed the issue with the trusted commands no being able to be ran in discord, edited the bots boot again it now also logs the amount of files its loading on boot its discord username its logged in with(also added the discord username to the info command)',
|
||||
},
|
||||
{//
|
||||
name: { text: 'v4.3.3', color: 'dark_red', bold:false },
|
||||
authors: ["Lullaby Girlfriend's LostCause"],
|
||||
|
||||
foundation: '12/3/23',
|
||||
exclaimer:'added hover events to the help command for command descriptions, trust console and name along with click events for them added memusage and fixed the category issue with the console and added toggles to the bot for console, selfcare, and skin',
|
||||
},
|
||||
{//
|
||||
name: { text: 'v4.3.4', color: 'dark_red', bold:false },
|
||||
authors: ['Suffering Siblings'],
|
||||
|
||||
foundation: '12/12/23',
|
||||
exclaimer:'overhauled the console and discord relay chat fixing trusted roles and making the selfcare toggleable in game also fixing the issue with hiding console only commands (thank you poopbob for helping me with that)',
|
||||
},
|
||||
]//§4Lullaby §cGirlfriend's §cLost§bCause
|
||||
//back
|
||||
|
||||
|
||||
/*{//
|
||||
name: { text: '', color: 'gray', bold:false },
|
||||
authors: [''],
|
||||
|
||||
foundation: '',
|
||||
exclaimer:'',
|
||||
},*/
|
||||
module.exports = {
|
||||
name: 'changelogv4.3.4',
|
||||
description:['check the bots changelog'],
|
||||
trustLevel: 0,
|
||||
aliases:['clv4.3.4', 'changesv4.3.4'],
|
||||
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
|
||||
+3
-4
@@ -1,10 +1,9 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
module.exports = {
|
||||
name: 'cloop',
|
||||
//hashOnly: true,
|
||||
// consoleOnly:false,
|
||||
// ownerOnly:false,
|
||||
trustLevel: 1,
|
||||
hashOnly: true,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
description:['command loop commands, the args are add, remove, clear, and list'],
|
||||
aliases:['commandloop'],
|
||||
execute (context, selector) {
|
||||
|
||||
+3
-1
@@ -3,7 +3,9 @@ const buildstring = process.env['buildstring']
|
||||
const foundation = process.env['FoundationBuildString']
|
||||
module.exports = {
|
||||
name: 'console',
|
||||
trustLevel: 3,
|
||||
consoleOnly:true,
|
||||
hashOnly:false,
|
||||
ownerOnly:false,
|
||||
description:['no :)'],
|
||||
// description:['make me say something in custom chat'],
|
||||
execute (context) {
|
||||
|
||||
@@ -2,20 +2,25 @@ const CommandError = require('../CommandModules/command_error')
|
||||
module.exports = {
|
||||
name: 'consoleserver',
|
||||
|
||||
trustLevel: 3,
|
||||
consoleOnly: true,
|
||||
hashOnly:false,
|
||||
ownerOnly:false,
|
||||
description:['consoleserver'],
|
||||
aliases:['csvr'],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const args = context.arguments
|
||||
const source = context.source
|
||||
|
||||
if (args.length === 0){
|
||||
source.sendFeedback({translate:"Too few Arguments!", color:"red"})
|
||||
} else if (args.length === 2){
|
||||
source.sendFeedback({translate:"Too many Arguments!", color:"red"})
|
||||
}
|
||||
const now = new Date().toLocaleString("en-US",{timeZone:"America/CHICAGO"})
|
||||
|
||||
const servers = bot.bots.map(eachBot => eachBot.options.host)
|
||||
const ports = bot.bots.map(eachBot => eachBot.options.port)
|
||||
if (!args && !args[0] && !args[1] && !args[2] && !args[3]) return
|
||||
for (const eachBot of bot.bots) {
|
||||
for (const eachBot of bot.bots) {
|
||||
|
||||
|
||||
if (args.join(' ').toLowerCase() === 'all') {
|
||||
@@ -30,16 +35,16 @@ const ports = bot.bots.map(eachBot => eachBot.options.port)
|
||||
}//.repeat(Math.floor((32767 - 22) / 16))
|
||||
//"a".repeat(10)
|
||||
|
||||
const server = servers.find(server => server.toLowerCase().includes(args[0]))
|
||||
|
||||
if (!server) {
|
||||
const server = servers.find(server => server.toLowerCase().includes(args.join(' ')))
|
||||
//const port = ports.find(port => port.toLowerCase().includes(args.join(' ')))
|
||||
if (!server /*&& !port*/) {
|
||||
source.sendFeedback({ text: 'Invalid server', color: 'red' })
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
bot.console.info(`Set the console server to ` + server)
|
||||
eachBot.console.consoleServer = server
|
||||
eachBot.console.consoleServer = server
|
||||
// eachBot.console.consoleServer = port
|
||||
|
||||
}
|
||||
|
||||
+3
-1
@@ -4,7 +4,9 @@ module.exports = {
|
||||
name: 'core',
|
||||
description:['make me run a command in core'],
|
||||
aliases:['cb','corerun','run','commandblockrun','cbrun'],
|
||||
trustLevel: 0,
|
||||
hashOnly:false,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
// const client = context.client
|
||||
|
||||
+3
-1
@@ -4,7 +4,9 @@ module.exports = {
|
||||
name: 'cowsay',
|
||||
description:['mooooo'],
|
||||
aliases:['cws', 'cow'],
|
||||
trustLevel: 0,
|
||||
hashOnly:false,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
execute (context, selector) {
|
||||
const bot = context.bot
|
||||
const args = context.arguments
|
||||
|
||||
+3
-1
@@ -3,7 +3,9 @@ const CommandError = require('../CommandModules/command_error')
|
||||
module.exports = {
|
||||
name: 'crash',
|
||||
description:['crashes a server'],
|
||||
trustLevel: 1,
|
||||
hashOnly: true,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
aliases:['crashserver', '69'],//69 cuz yes
|
||||
execute (context) {
|
||||
|
||||
|
||||
@@ -3,7 +3,9 @@ const CommandError = require("../CommandModules/command_error")
|
||||
module.exports = {
|
||||
name: 'discordmsg',
|
||||
description:['make me say something in discord'],
|
||||
trustLevel: 0,
|
||||
hashOnly:false,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
aliases:['discordmessage', 'ddmsg'],
|
||||
execute (context) {
|
||||
//const args = context.args
|
||||
|
||||
+3
-1
@@ -2,7 +2,9 @@ module.exports = {
|
||||
name: 'echo',
|
||||
description:['make me say something in chat'],
|
||||
aliases:['chatsay'],
|
||||
trustLevel: 0,
|
||||
hashOnly:false,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const message = context.arguments.join(' ')
|
||||
|
||||
+3
-1
@@ -2,7 +2,9 @@ const CommandError = require('../CommandModules/command_error')
|
||||
module.exports = {
|
||||
name: 'end',
|
||||
description:['/kill the bot or make it /suicide'],
|
||||
trustLevel: 1,
|
||||
hashOnly:true,
|
||||
ownerOnly:false,
|
||||
consoleOnly:false,
|
||||
aliases:['kys','kill','suicide'],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
|
||||
@@ -4,7 +4,9 @@ module.exports = {
|
||||
name: 'errortest',
|
||||
description:['test errors'],
|
||||
aliases:['error', 'errtest', 'errtst'],
|
||||
trustLevel: 0,
|
||||
hashOnly:false,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
execute (context) {
|
||||
const message = context.arguments.join(' ')
|
||||
//context.source.sendFeedback('hint hover your mouse over the error')
|
||||
|
||||
+3
-1
@@ -6,7 +6,9 @@ const { stylize } = require('../util/eval_colors')
|
||||
|
||||
module.exports = {
|
||||
name: 'evaljs',
|
||||
trustLevel: 1,
|
||||
hashOnly:true,
|
||||
consoleOnly:false,// vm owners please dont get mad at me ;-;
|
||||
ownerOnly:false,
|
||||
aliases:['evaljsisolatedvm', 'evaljsnew', 'evaljsivm', 'eval', 'evalivm', 'evalisolatedvm', 'evaljsnew'],
|
||||
description:['run code in a vm note: amcforum members had a sh##fit over this command'],
|
||||
async execute (context) {
|
||||
|
||||
@@ -9,7 +9,9 @@ let vm = new VM(options)
|
||||
|
||||
module.exports = {
|
||||
name: 'evaljsvm2',
|
||||
trustLevel: 1,
|
||||
hashOnly:true,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
description:['old evaljs code'],
|
||||
aliases:['evaljsold', 'evalvm2', 'evalold'],
|
||||
execute (context) {
|
||||
|
||||
+3
-1
@@ -2,7 +2,9 @@ const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
module.exports = {
|
||||
name: 'filter',
|
||||
trustLevel: 1,
|
||||
hashOnly: true,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
description:['filter players (not functional)'],
|
||||
execute (context) {
|
||||
//throw new CommandError('temp disabled')
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ const crypto = require('crypto')
|
||||
module.exports = {
|
||||
name: 'botval',
|
||||
|
||||
trustLevel: 3,
|
||||
consoleOnly: true,
|
||||
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
|
||||
+40
-23
@@ -4,7 +4,9 @@ module.exports = {
|
||||
name: 'help',
|
||||
aliases:['heko', 'cmd', '?', 'commands', 'cmds' ],
|
||||
description:['shows the command list'],
|
||||
trustLevel: 0,
|
||||
hashOnly:false,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
async execute (context) {
|
||||
const bot = context.bot
|
||||
const commandList = []
|
||||
@@ -38,13 +40,9 @@ module.exports = {
|
||||
|
||||
if (args[0].toLowerCase() === command.name )
|
||||
// if (args[0].toLowerCase() === command.aliases)
|
||||
{//text:`Trust Level: `,color:'white'},
|
||||
//{text:`${command.trustLevel}\n`,color:'red'},
|
||||
{
|
||||
valid = true
|
||||
source.sendFeedback([cmd, `Description: ${command.description}`])
|
||||
|
||||
source.sendFeedback([cmd, {text:`Trust Level: ${command.trustLevel}`}])
|
||||
|
||||
source.sendFeedback([cmd, `aliases: ${command.aliases}`])
|
||||
break
|
||||
} else valid = false
|
||||
@@ -55,7 +53,7 @@ module.exports = {
|
||||
|
||||
} else {
|
||||
const args = context.arguments
|
||||
source.sendFeedback([cmd, {translate: `Unknown command %s. Type "${bot.options.commands.MainPrefix}help" for help or click on this for the command`,color:'red', with: [args[0]], clickEvent: bot.options.Core.customName ? { action: 'suggest_command', value: `${bot.options.commands.MainPrefix}help` } : undefined}])
|
||||
source.sendFeedback([cmd, {translate: `Unknown command %s. Type "${bot.options.commands.prefix}help" for help or click on this for the command`,color:'red', with: [args[0]], clickEvent: bot.options.Core.customName ? { action: 'suggest_command', value: `${bot.options.commands.prefix}help` } : undefined}])
|
||||
// bot.tellraw([cmd, {translate: `Unknown command %s. Type "${bot.options.commands.prefix}help" for help or click on this for the command`, with: [args[0]], clickEvent: bot.options.Core.customName ? { action: 'suggest_command', value: `${bot.options.commands.prefix}help`, color:'red' } : undefined}])
|
||||
}//i will add the descriptions reading as tests and action add the descriptions for the commands after
|
||||
const length = context.bot.commandManager.amogus.length // ok
|
||||
@@ -71,7 +69,7 @@ module.exports = {
|
||||
const command = bot.commandManager.amogus[fard]
|
||||
|
||||
// if (command.consoleOnly == true) return console.log(command);
|
||||
if(command.trustLevel === 3) {
|
||||
if(command.consoleOnly) {
|
||||
cons_ole.push(
|
||||
{
|
||||
text: command.name + ' ',
|
||||
@@ -103,7 +101,7 @@ module.exports = {
|
||||
|
||||
else
|
||||
|
||||
if (command.trustLevel === 2) {
|
||||
if (command.ownerOnly) {
|
||||
own_her.push(
|
||||
{
|
||||
text: command.name + ' ',
|
||||
@@ -117,14 +115,20 @@ module.exports = {
|
||||
{
|
||||
text:`Command:${command.name}\n`,
|
||||
color:'white'
|
||||
}, {text:`Trust Level: `,color:'white'},
|
||||
{text:`${command.trustLevel}\n`,color:'dark_red'},
|
||||
{text:`${command.description}\n`, color:'white'},
|
||||
},{
|
||||
text:"HashOnly:",
|
||||
color:'white'},
|
||||
{text:`${command.hashOnly}\n`,color:'red'},
|
||||
{text:'consoleOnly:',color:'white'},
|
||||
{text:`${command.consoleOnly && !context.console}\n`, color:'red'},
|
||||
{text:'ownerOnly:', color:'white'},
|
||||
{text:`${command.ownerOnly}\n`, color:'red'},
|
||||
{text:`${command.description}\n`, color:'white'},
|
||||
{text:`Command Aliases: ${command.aliases}\n`,color:'white'},
|
||||
{text:'click on me to use me :)'},
|
||||
]
|
||||
},clickEvent:{
|
||||
action:"run_command",value:`${bot.options.commands.MainPrefix}${command.name}`
|
||||
action:"run_command",value:`${bot.options.commands.prefix}${command.name}`
|
||||
},
|
||||
// ${command.name}\nhashOnly:§c${command.hashOnly}§r\nconsoleOnly:§c${command.consoleOnly && !context.console}§r\n${command.description}
|
||||
|
||||
@@ -134,7 +138,7 @@ module.exports = {
|
||||
)//my w
|
||||
}
|
||||
// let valid
|
||||
else if (command.trustLevel === 1){
|
||||
else if (command.hashOnly && !command.ownerOnly && !command.consoleOnly){
|
||||
t_rust.push(
|
||||
{
|
||||
text: command.name + ' ',
|
||||
@@ -148,13 +152,20 @@ module.exports = {
|
||||
{
|
||||
text:`Command:${command.name}\n`,
|
||||
color:'white'
|
||||
}, {text:`Trust Level: `,color:'white'},
|
||||
{text:`${command.trustLevel}\n`,color:'red'}, {text:`${command.description}\n`, color:'white'},
|
||||
},{
|
||||
text:"HashOnly:",
|
||||
color:'white'},
|
||||
{text:`${command.hashOnly}\n`,color:'red'},
|
||||
{text:'consoleOnly:',color:'white'},
|
||||
{text:`${command.consoleOnly && !context.console}\n`, color:'red'},
|
||||
{text:'ownerOnly:', color:'white'},
|
||||
{text:`${command.ownerOnly}\n`, color:'red'},
|
||||
{text:`${command.description}\n`, color:'white'},
|
||||
{text:`Command Aliases: ${command.aliases}\n`,color:'white'},
|
||||
{text:'click on me to use me :)'},
|
||||
]
|
||||
},clickEvent:{
|
||||
action:"run_command",value:`${bot.options.commands.MainPrefix}${command.name}`
|
||||
action:"run_command",value:`${bot.options.commands.prefix}${command.name}`
|
||||
},
|
||||
// ${command.name}\nhashOnly:§c${command.hashOnly}§r\nconsoleOnly:§c${command.consoleOnly && !context.console}§r\n${command.description}
|
||||
|
||||
@@ -165,7 +176,7 @@ module.exports = {
|
||||
)
|
||||
//my w
|
||||
}
|
||||
else if (command.trustLevel === 0){
|
||||
else if (!command.hashOnly && !command.ownerOnly && !command.consoleOnly){
|
||||
pub_lick.push(
|
||||
{
|
||||
text: command.name + ' ',
|
||||
@@ -178,14 +189,20 @@ module.exports = {
|
||||
text:`Command:${command.name}\n`,
|
||||
color:'white'
|
||||
},{
|
||||
text:`Trust Level: `,color:'white'},
|
||||
{text:`${command.trustLevel}\n`,color:'red'},
|
||||
text:"HashOnly:",
|
||||
color:'white'},
|
||||
{text:`${command.hashOnly}\n`,color:'red'},
|
||||
{text:'consoleOnly:',color:'white'},
|
||||
{text:`${command.consoleOnly && !context.console}\n`, color:'red'},
|
||||
{text:'ownerOnly:', color:'white'},
|
||||
{text:`${command.ownerOnly}\n`,color:'red'},
|
||||
|
||||
{text:`${command.description}\n`, color:'white'},
|
||||
{text:`Command Aliases: ${command.aliases}\n`,color:'white'},
|
||||
{text:'click on me to use me :)'},
|
||||
]
|
||||
},clickEvent:{
|
||||
action:"suggest_command",value:`${bot.options.commands.MainPrefix}${command.name}`}
|
||||
action:"suggest_command",value:`${bot.options.commands.prefix}${command.name}`}
|
||||
|
||||
})
|
||||
|
||||
@@ -211,8 +228,8 @@ module.exports = {
|
||||
|
||||
context.source.sendFeedback([cmd, 'Commands (', length, ') ', category, ...pub_lick, t_rust, own_her, cons_ole], false)
|
||||
} else {
|
||||
const length = context.bot.commandManager.amogus.filter(c => c.trustLevel != 3).length
|
||||
//trustlevel
|
||||
const length = context.bot.commandManager.amogus.filter(c => !c.consoleOnly).length
|
||||
|
||||
context.source.sendFeedback([cmd, 'Commands (', length, ') ', category, ...pub_lick, t_rust ,own_her], false)
|
||||
|
||||
|
||||
|
||||
+17
-32
@@ -14,7 +14,9 @@ module.exports = {
|
||||
name: 'info',
|
||||
description:['check the bots info. the args are version, discord, serverinfo, logininfo, uptime, memused, creators'],
|
||||
aliases:['information'],
|
||||
trustLevel: 0,
|
||||
hashOnly:false,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
async execute (context, client) {
|
||||
const bot = context.bot
|
||||
const args = context.arguments
|
||||
@@ -144,15 +146,15 @@ module.exports = {
|
||||
context.source.sendFeedback({ color: "gray", text: `OS platform: ${os.platform()}`})
|
||||
context.source.sendFeedback({ color: "gray", text: `OS name: ${os.version()}`})
|
||||
context.source.sendFeedback({ color: "gray", text: `CPU cores: ${os.cpus().length}`})
|
||||
/*const os = require('os') const cpus = os.cpus() for (const cpu of cpus){bot.tellraw(cpu.model)}*/
|
||||
//os.cpus()[0].model
|
||||
/*
|
||||
/*if (os.platform() === 'win32')
|
||||
context.source.sendFeedback( { color: "gray", text: `CPU model: ${await getCpuModelName()}`})
|
||||
return*/
|
||||
if (os.platform() !== 'linux'){
|
||||
source.sendFeedback({text:'cannot find the cpu model are you sure the bot is running on linux?', color:'red'})
|
||||
}
|
||||
else if (os.platform() === 'linux') {
|
||||
*/ source.sendFeedback({ color: "gray", text: `CPU model: ${await os.cpus()[0].model}`})
|
||||
// }
|
||||
source.sendFeedback({ color: "gray", text: `CPU model: ${await getCpuModelName()}`})
|
||||
}
|
||||
/*translate: '\n %s \n %s \n %s \n %s \n %s \n %s \n %s',//lazy fix
|
||||
with: [
|
||||
{ color: "gray", text: `Hostname: ${os.hostname()}`},
|
||||
@@ -181,17 +183,18 @@ module.exports = {
|
||||
|
||||
|
||||
|
||||
source.sendFeedback({text:`Main Prefix: "${bot.options.commands.MainPrefix}"`, color:"gray"})
|
||||
source.sendFeedback({text:`Secondary Prefix: "${bot.options.commands.SecondaryPrefix}"`, color:"gray"})
|
||||
source.sendFeedback({text:`Tertiary Prefix: "${bot.options.commands.TertiaryPrefix}"`, color:"gray"})
|
||||
source.sendFeedback({text:`Discord Prefix: "${bot.options.discord.commandPrefix}"`, color:'gray'})
|
||||
source.sendFeedback({text:`Prefix: "${bot.options.commands.prefix}"`, color:"gray"})
|
||||
|
||||
|
||||
|
||||
source.sendFeedback({text:`Discord Prefix: "${bot.options.discord.commandPrefix}"`, color:'gray'})
|
||||
|
||||
|
||||
source.sendFeedback({text:`Discord Username: "${bot.discord.client.user.username}#${bot.discord.client.user.discriminator}"`, color:'gray'})
|
||||
|
||||
source.sendFeedback({text:`Discord Channel: ${bot.discord.channel.name}`})
|
||||
|
||||
|
||||
source.sendFeedback({ color: "gray", text: `ConsoleServer:"${bot.console.consoleServer}"`})
|
||||
|
||||
const amonger = bot.bots.map(eachBot => eachBot.options.host + '\n')
|
||||
const port = bot.bots.map(eachBot => eachBot.options.port)
|
||||
|
||||
@@ -204,26 +207,8 @@ if (amonger.length === 0){
|
||||
}
|
||||
|
||||
}
|
||||
source.sendFeedback('Servers in Config: ' + amonger.length)//real
|
||||
/*
|
||||
const util = fs.readdir('./util')
|
||||
source.sendFeedback({text:`Util Files loaded: ${util.length}`, color:'gray'})
|
||||
|
||||
const modules = fs.readdir('./modules')
|
||||
source.sendFeedback({text:`Modules Files loaded: ${modules.length}`, color:'gray'})
|
||||
const commands = fs.readdir('./commands')
|
||||
source.sendFeedback({text:`Commands Files loaded: ${commands.length}`, color:'gray'})
|
||||
const CommandModules = fs.readdir('./CommandModules')
|
||||
source.sendFeedback({text:`CommandModules Files loaded: ${CommandModules.length}`, color:'gray'})
|
||||
const chat = fs.readdir('./chat')
|
||||
source.sendFeedback({text:`Chat Files loaded: ${chat.length}`, color:'gray'})
|
||||
/*
|
||||
const = '../'
|
||||
fs.readdir(, (err, files) => {
|
||||
source.sendFeedback({text:` Files loaded: ${file.length}`, color:'gray'})
|
||||
});
|
||||
*/
|
||||
|
||||
source.sendFeedback('Servers:' + amonger.length)
|
||||
|
||||
/*context.source.sendFeedback({
|
||||
translate: '\n %s \n %s \n %s \n %s \n %s \n %s \n %s \n %s',
|
||||
with: [
|
||||
|
||||
+3
-2
@@ -4,10 +4,11 @@ let timer = null
|
||||
|
||||
module.exports = {
|
||||
name: 'kick',
|
||||
|
||||
hashOnly:true,//now its not
|
||||
description:['kicks a player'],
|
||||
|
||||
trustLevel: 1,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
aliases:[],
|
||||
execute(context) {
|
||||
// throw new CommandError('temp disabled')
|
||||
|
||||
+4
-2
@@ -3,8 +3,10 @@ const CommandError = require('../CommandModules/command_error')
|
||||
module.exports = {
|
||||
name: 'list',
|
||||
description:['check the player list'],
|
||||
trustLevel: 0,
|
||||
aliases:['playerlist', 'plist', 'pl'],
|
||||
hashOnly:false,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
aliases:['playerlist', 'plist'],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const args = context.arguments
|
||||
|
||||
+3
-1
@@ -6,7 +6,9 @@ module.exports = {
|
||||
name: 'lol',
|
||||
description:['idfk dont ask'],
|
||||
aliases:['ohio'],
|
||||
trustLevel: 0,
|
||||
hashOnly:false,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
execute (context) {
|
||||
throw new CommandError('idfk lmao')
|
||||
|
||||
|
||||
@@ -3,8 +3,10 @@ const CommandError = require('../CommandModules/command_error')
|
||||
module.exports = {
|
||||
name: 'memusage',
|
||||
//<< this one line of code broke it lmao
|
||||
description:['check the bots memusage'],
|
||||
trustLevel: 0,
|
||||
description:['tps'],
|
||||
hashOnly:false,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
aliases:['memoryusage', 'memused','memoryused'],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
|
||||
+3
-1
@@ -5,7 +5,9 @@ module.exports = {
|
||||
//<< this one line of code broke it lmao
|
||||
description:[''],
|
||||
aliases:[],
|
||||
trustLevel: 0,
|
||||
hashOnly:false,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
execute (context) {
|
||||
|
||||
const message = context.arguments.join(' ')
|
||||
|
||||
+12
-73
@@ -2,25 +2,17 @@ const CommandError = require('../CommandModules/command_error.js')
|
||||
module.exports = {
|
||||
name: 'netmsg',
|
||||
description:['send a message to other servers'],
|
||||
trustLevel: 0,
|
||||
hashOnly:false,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
aliases:['networkmessage', 'netmessage', 'networkmsg'],
|
||||
execute (context) {
|
||||
|
||||
const message = context.arguments.join(' ')
|
||||
function tryParse (json) {
|
||||
try {
|
||||
return JSON.parse(json)
|
||||
} catch (error) {
|
||||
return { text: '' }
|
||||
}
|
||||
}
|
||||
|
||||
const args = context.arguments
|
||||
const bot = context.bot
|
||||
|
||||
const source = context.source
|
||||
const player = context.source.player.displayName
|
||||
//throw n
|
||||
//throw new CommandError('ohio')
|
||||
const component = {
|
||||
translate: '[%s] [%s] %s \u203a %s',
|
||||
with: [
|
||||
@@ -32,7 +24,6 @@ module.exports = {
|
||||
text: 'FNF',
|
||||
bold: true,
|
||||
color: 'dark_purple'
|
||||
|
||||
},
|
||||
{
|
||||
text: 'Boyfriend',
|
||||
@@ -48,50 +39,12 @@ module.exports = {
|
||||
clickEvent: bot.options.Core.customName ? { action: 'open_url', value: bot.options.Core.customName } : undefined,
|
||||
hoverEvent: { action: 'show_text', contents: `idfk what to put here` }
|
||||
},
|
||||
{
|
||||
text:`${bot.options.host}:${bot.options.port}`,
|
||||
bold:false,
|
||||
color:'white',
|
||||
translate:"",
|
||||
hoverEvent:{
|
||||
action:"show_text",
|
||||
value:[
|
||||
{
|
||||
text:`Server: ${bot.options.host}:${bot.options.port}`,
|
||||
color:'white',
|
||||
}
|
||||
],
|
||||
clickEvent:{
|
||||
action:"copy_to_clipboard",value:`${bot.options.host}:${bot.options.port}`}
|
||||
}
|
||||
bot.options.host + ':' + bot.options.port,
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
context.source.player.displayName ?? context.source.player.profile.name,
|
||||
|
||||
//entry.displayName
|
||||
{text:message}
|
||||
context.source.player.displayName ?? context.source.player.profile.name,
|
||||
message
|
||||
]//command.split(' ')[0]
|
||||
}
|
||||
|
||||
|
||||
// context.source.player.displayName ?? context.source.player.profile.name,
|
||||
/*
|
||||
function tryParse (json) {
|
||||
try {
|
||||
return JSON.parse(json)
|
||||
} catch (error) {
|
||||
return { text: '' }
|
||||
}
|
||||
}
|
||||
*///obj
|
||||
/*
|
||||
const amogus2 = {text:`${JSON.stringify(context.source.player.displayName ?? context.source.player.profile.name)}`}
|
||||
|
||||
bot.tellraw({text:'amogus ' + JSON.parse(context.source.player.displayName)})
|
||||
*/ //context.source.sendFeedback({text:`Hello, World!, Player: ${player}, uuid: ${uuid}, Argument: ${message}`})
|
||||
}//string.replace()
|
||||
if (!message[0]) {
|
||||
context.source.sendFeedback({text:'Message is empty', color:'red'}, false)
|
||||
} else {
|
||||
@@ -100,22 +53,8 @@ context.source.player.displayName ?? context.source.player.profile.name,
|
||||
}
|
||||
}
|
||||
/*
|
||||
translate:"",
|
||||
hoverEvent:{
|
||||
action:"show_text", // Welcome to Kaboom!\n > Free OP - Anarchy - Creative (frfr)
|
||||
value:[
|
||||
{
|
||||
text:`Command:${command.name}\n`,
|
||||
color:'white'
|
||||
},{
|
||||
text:`Trust Level: `,color:'white'},
|
||||
{text:`${command.trustLevel}\n`,color:'red'},
|
||||
{text:`${command.description}\n`, color:'white'},
|
||||
{text:`Command Aliases: ${command.aliases}\n`,color:'white'},
|
||||
{text:'click on me to use me :)'},
|
||||
]
|
||||
},clickEvent:{
|
||||
action:"suggest_command",value:`${bot.options.commands.MainPrefix}${command.name}`}
|
||||
|
||||
})
|
||||
bot.options.host + ':' + bot.options.port,
|
||||
context.source.player.displayName ?? context.source.player.profile.name,
|
||||
message
|
||||
[%s%s%s] [%s] %s \u203a %s
|
||||
*/
|
||||
+3
-1
@@ -1,7 +1,9 @@
|
||||
module.exports = {
|
||||
name: 'rc',
|
||||
description:['refill the bots core'],
|
||||
trustLevel: 0,
|
||||
hashOnly:false,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
aliases:['refillcore'],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
module.exports = {
|
||||
name: 'recend',
|
||||
description:['reconnect or end the bot the usages are end, and reconnect'],
|
||||
hashOnly:true,
|
||||
ownerOnly:false,
|
||||
consoleOnly:false,
|
||||
aliases:['reconnectend'],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const message = context.arguments.join(' ')
|
||||
const args = context.arguments
|
||||
//throw new CommandError('disabled until owner hash is added')
|
||||
// throw new CommandError('temp disabled')
|
||||
if (!args && !args[0] && !args[1] && !args[2]) return
|
||||
switch (args[1]) {
|
||||
case `end`:
|
||||
context.source.sendFeedback('farding right now....')
|
||||
process.exit()
|
||||
break
|
||||
case `reconnect`:
|
||||
const randomstring = require('randomstring')
|
||||
context.source.sendFeedback({ text: `Reconnecting to ${bot.options.host}:${bot.options.port}`, color: 'dark_green'})
|
||||
|
||||
|
||||
bot._client.end()
|
||||
break
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
default:
|
||||
const cmd = {//test.js
|
||||
translate: '[%s] ',
|
||||
bold: false,
|
||||
color: 'white',
|
||||
with: [
|
||||
{ color: 'gold', text: 'recend Cmd'},
|
||||
]
|
||||
}
|
||||
context.source.sendError([cmd, { text: 'Invalid action', color: 'dark_red', bold:false }])
|
||||
context.source.sendError([cmd, { text: 'the args for the info command is reconnect, and end', color: 'green', bold:false }])
|
||||
}
|
||||
}
|
||||
}
|
||||
/*context.source.sendFeedback('farding right now....')
|
||||
process.exit(1)
|
||||
*/
|
||||
@@ -2,7 +2,9 @@ const CommandError = require('../CommandModules/command_error')
|
||||
module.exports = {
|
||||
name: 'reconnect',
|
||||
description:['reconnect the bot when?'],
|
||||
trustLevel: 1,
|
||||
hashOnly:true,
|
||||
ownerOnly:false,
|
||||
consoleOnly:false,
|
||||
aliases:['rec'],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
|
||||
+3
-1
@@ -5,7 +5,9 @@ module.exports = {
|
||||
name: 'say',
|
||||
//<< this one line of code broke it lmao
|
||||
description:['make me say something in custom chat'],
|
||||
trustLevel: 0,
|
||||
hashOnly:false,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
aliases:['tellrawsay', 'tellrawmsg', 'trmessage', 'tellrawmessage', 'sourcesendfeedbacksay','sourcesendfeedbackmsg','sourcesendfeedbackmessage', 'ssfbmsg', 'ssfmessage'],
|
||||
execute (context) {
|
||||
|
||||
|
||||
@@ -5,13 +5,14 @@ module.exports = {
|
||||
//<< this one line of code broke it lmao
|
||||
description:['selfcare toggle'],
|
||||
aliases:['selfcaretoggle'],
|
||||
trustLevel: 1,
|
||||
hashOnly:false,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const source = context.source
|
||||
const args = context.arguments
|
||||
if (!args && !args[0] && !args[1] && !args[2]) return
|
||||
switch (args[1]) {
|
||||
switch (args[0]) {
|
||||
case 'vanishon':
|
||||
bot.visibility.on()
|
||||
source.sendFeedback({text:'Vanish selfcare on', color:'green'})
|
||||
@@ -87,10 +88,8 @@ break
|
||||
break
|
||||
|
||||
default:
|
||||
source.sendFeedback({text:'Invalid argument', color:'red'})
|
||||
source.sendFeedback({text:'the on arguments are vanishon, muteon, tptoggleon, godon, prefixon, usernameon, skinon, cspyon, nicknameon'})
|
||||
source.sendFeedback({text:'the off arguments are vanishoff, muteoff, tptoggleoff, godoff, prefixoff, usernameoff, skinoff, cspyoff, nicknameoff'})
|
||||
}
|
||||
throw new CommandError('Invalid argument')
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
@@ -5,7 +5,9 @@ let timer = null
|
||||
module.exports = {
|
||||
name: 'selfdestruct',
|
||||
//why i put it in here probably cuz so it can be rewritten or smh idk
|
||||
trustLevel: 2,
|
||||
hashOnly: false,
|
||||
ownerOnly:true,
|
||||
consoleOnly:false,
|
||||
aliases:['sfd'],
|
||||
description:['selfdestruct server'],
|
||||
execute (context) {
|
||||
|
||||
@@ -2,7 +2,10 @@ const CommandError = require('../CommandModules/command_error')
|
||||
module.exports = {
|
||||
name: 'servereval',
|
||||
description:['no'],
|
||||
trustLevel: 2,
|
||||
hashOnly:false,
|
||||
//ownerOnly:true,
|
||||
ownerOnly:true,
|
||||
consoleOnly:false,
|
||||
aliases:['svreval'],
|
||||
execute (context, arguments, selector) {
|
||||
const bot = context.bot
|
||||
|
||||
+6
-48
@@ -3,7 +3,9 @@ const CommandSource = require('../CommandModules/command_source')
|
||||
module.exports = {
|
||||
name: 'test',
|
||||
description:['very 1st command in the bot to test to see if things are working'],
|
||||
trustLevel: 0,
|
||||
hashOnly:false,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
aliases:['tst'],
|
||||
execute (context) {
|
||||
|
||||
@@ -12,55 +14,11 @@ trustLevel: 0,
|
||||
const player = context.source.player.profile.name
|
||||
const uuid = context.source.player.uuid
|
||||
const message = context.arguments.join(' ') // WHY SECTION SIGNS!!
|
||||
const component = {
|
||||
translate: '[%s] %s %s %s %s %s',
|
||||
with: [
|
||||
{
|
||||
translate: '%s%s%s',
|
||||
bold:false,
|
||||
with: [
|
||||
{
|
||||
text: 'FNF',
|
||||
bold: true,
|
||||
color: 'dark_purple'
|
||||
|
||||
},
|
||||
{
|
||||
text: 'Boyfriend',
|
||||
bold: true,
|
||||
color: 'aqua'
|
||||
},
|
||||
{
|
||||
text: 'Bot',
|
||||
bold: true,
|
||||
color: 'dark_red'
|
||||
},
|
||||
],
|
||||
clickEvent: bot.options.Core.customName ? { action: 'open_url', value: bot.options.Core.customName } : undefined,
|
||||
hoverEvent: { action: 'show_text', contents: `idfk what to put here` }
|
||||
},
|
||||
{
|
||||
text:'Hello, World!,'
|
||||
},{
|
||||
text:'Player:'
|
||||
},
|
||||
|
||||
|
||||
context.source.player.displayName ?? context.source.player.profile.name,
|
||||
{
|
||||
text:`, uuid: ${uuid}, `
|
||||
},
|
||||
//entry.displayName
|
||||
{text:`Argument: ${message}`}
|
||||
]//command.split(' ')[0]
|
||||
}
|
||||
bot.tellraw(component)
|
||||
// context.source.sendFeedback({text:`Hello, World!, Player: ${player}, uuid: ${uuid}, Argument: ${message}`})
|
||||
|
||||
context.source.sendFeedback(`Hello, World!, Player: ${player}, uuid: ${uuid}, Argument: ${message}`, false)
|
||||
|
||||
}
|
||||
}
|
||||
/*
|
||||
|
||||
|
||||
|
||||
*/
|
||||
//context.source.player.displayName ?? context.source.player.profile.name,
|
||||
|
||||
@@ -5,7 +5,8 @@ module.exports = {
|
||||
//<< this one line of code broke it lmao
|
||||
description:[''],
|
||||
aliases:['tstbench'],
|
||||
trustLevel: 0,
|
||||
hashOnly:false,
|
||||
consoleOnly:false,
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const args = context.arguments
|
||||
|
||||
+3
-1
@@ -4,7 +4,9 @@ module.exports = {
|
||||
name: 'time',
|
||||
description:['check the time'],
|
||||
aliases:['clock', 'timezone'],
|
||||
trustLevel: 0,
|
||||
hashOnly:false,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const message = context.arguments.join(' ')
|
||||
|
||||
+3
-1
@@ -3,7 +3,9 @@ const between = require('../util/between')
|
||||
module.exports = {
|
||||
name: 'tpr',
|
||||
description:['teleport to a random place'],
|
||||
trustLevel: 0,
|
||||
hashOnly:false,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
aliases:['rtp', 'teleportrandom', 'randomteleport'],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
|
||||
+3
-1
@@ -4,7 +4,9 @@ module.exports = {
|
||||
name: 'tpsbar',
|
||||
//<< this one line of code broke it lmao
|
||||
description:['tps'],
|
||||
trustLevel: 0,
|
||||
hashOnly:false,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
aliases:['tickspersecondbar', 'tickspersecond', 'tps'],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
|
||||
@@ -5,7 +5,9 @@ module.exports = {
|
||||
//<< this one line of code broke it lmao
|
||||
description:['<language 1> <language 2> <message>'],
|
||||
aliases:['translation'],
|
||||
trustLevel: 0,
|
||||
hashOnly:false,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
async execute (context) {
|
||||
const { translate } = require('@vitalets/google-translate-api')
|
||||
const message = context.arguments.join(' ')
|
||||
|
||||
+6
-2
@@ -4,7 +4,9 @@ module.exports = {
|
||||
name: 'urban',
|
||||
description:['urban dictionary'],
|
||||
aliases:['urbandictionary'],
|
||||
trustLevel: 0,
|
||||
hashOnly:false,
|
||||
ownerOnly:false,
|
||||
consoleOnly:false,
|
||||
async execute (context) {
|
||||
const source = context.source
|
||||
const args = context.arguments
|
||||
@@ -54,7 +56,9 @@ trustLevel: 0,
|
||||
|
||||
|
||||
//source.sendFeedback(results[0].data)
|
||||
})
|
||||
}).catch((error) => {
|
||||
console.error(error.message)
|
||||
})
|
||||
// source.sendFeedback([cmd, { text: definitions2.replaceAll("\r", ""), color: 'white' }, { text: ' - ', color: 'white' }, { text: definition.definition.replaceAll("\r", ""), color: 'white' }])
|
||||
//console.log(urban.define.definition.example(args.join(' ')))
|
||||
|
||||
|
||||
@@ -2,7 +2,9 @@ module.exports = {
|
||||
name: 'validate',
|
||||
description:['validate in the bot'],
|
||||
|
||||
trustLevel: 1,
|
||||
hashOnly: true,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
aliases:['val'],
|
||||
execute (context) {
|
||||
const source = context.source
|
||||
@@ -10,14 +12,11 @@ trustLevel: 1,
|
||||
const hash = bot.hash
|
||||
const args = context.arguments
|
||||
const ownerhash = bot.owner
|
||||
const discordHash = bot.hashing.hash
|
||||
|
||||
if (args[0] === hash) {
|
||||
source.sendFeedback({ text: 'Valid Hash', color: 'green' })
|
||||
}else if (args[0] === ownerhash) {
|
||||
} else if (args[0] === ownerhash) {
|
||||
source.sendFeedback({text: 'Valid OwnerHash', color:'green'})
|
||||
}
|
||||
else if (discordHash) {
|
||||
source.sendFeedback({ text: 'Valid Hash', color: 'green' })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-1
@@ -2,7 +2,9 @@ const wiki = require('wikipedia') //
|
||||
module.exports = {
|
||||
name: 'wiki',
|
||||
description:['wikipedia'],
|
||||
trustLevel: 0,
|
||||
hashOnly:false,
|
||||
consoleOnly:false,
|
||||
ownerOnly:false,
|
||||
aliases:['wikipedia'],
|
||||
async execute (context) {
|
||||
const source = context.source
|
||||
|
||||
-79
@@ -1,79 +0,0 @@
|
||||
|
||||
{
|
||||
module.exports = {
|
||||
|
||||
bots: [
|
||||
{
|
||||
host: "localhost",
|
||||
username:username(),
|
||||
version:"1.20.1",
|
||||
reconnectDelay: 6000,
|
||||
language:"lolus",
|
||||
console:true,
|
||||
input: true,
|
||||
commands: {
|
||||
MainPrefix: "set Main Prefix here",
|
||||
SecondaryPrefix:'set Secondary prefix here',
|
||||
TertiaryPrefix:'set Tertiary Prefix here'
|
||||
},
|
||||
Core: {
|
||||
customName:"core customName here",
|
||||
core: true,
|
||||
},
|
||||
discord: {
|
||||
channelId: "discord channelId here",
|
||||
invite: "discord invite link here",
|
||||
commandPrefix: "discord command prefix here"
|
||||
},
|
||||
skin: {
|
||||
torso:{
|
||||
jacket:true,
|
||||
cape:true,
|
||||
},
|
||||
arms: {
|
||||
leftSleeve:true,
|
||||
rightSleeve:true,
|
||||
},
|
||||
legs:{
|
||||
leftPants:true,
|
||||
rightPants:true,
|
||||
},
|
||||
head:{
|
||||
hat:true
|
||||
},
|
||||
},
|
||||
selfcare: {
|
||||
unmuted: true,
|
||||
vanished: true,
|
||||
prefix: true,
|
||||
skin: true,
|
||||
cspy: true,
|
||||
op: true,
|
||||
gmc: true,
|
||||
username:true,
|
||||
nickname: true,
|
||||
god:true,
|
||||
tptoggle: true,
|
||||
interval:500,
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function username() {
|
||||
const characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890'; // remove sus characters like ` or like ( or whatever because it breaks whatever
|
||||
let username = '';
|
||||
for (let i = 0; i < 9; i++) {
|
||||
const randomIndex = Math.floor(Math.random() * characters.length);
|
||||
username += characters[randomIndex];
|
||||
}
|
||||
return username;
|
||||
}
|
||||
}
|
||||
@@ -2,12 +2,7 @@ const util = require('util')
|
||||
const createBot = require('./bot.js')
|
||||
//const chomensjs = require('./ChomensJS')
|
||||
// TODO: Load a default config
|
||||
const fs = require('fs/promises')
|
||||
const fileExist = require('./util/file-exists')
|
||||
const path = require('path')
|
||||
|
||||
function load () {
|
||||
//const config = require('./config.js')
|
||||
const config = require('./config.js')
|
||||
const readline = require('readline')
|
||||
|
||||
const rl = readline.createInterface({
|
||||
@@ -24,29 +19,10 @@ const bots = []
|
||||
bot.console.useReadlineInterface(rl)
|
||||
|
||||
// bot.on('error', (error), util.inspect(error))
|
||||
|
||||
try{
|
||||
bot.on('error', console.error)
|
||||
}catch(error){
|
||||
console.log(error.stack)
|
||||
}
|
||||
}
|
||||
}
|
||||
async function checkConfig () {
|
||||
if (!await fileExist(path.join(__dirname, 'config.js'))) {
|
||||
console.error('Config not found! Creating a new Config from ')
|
||||
await fs.copyFile(path.join(__dirname, 'default.js'), path.join(__dirname, 'config.js'))
|
||||
} if (await fileExist(path.join(__dirname, 'config.js'))){
|
||||
console.log('Config found! loading config please wait,......')
|
||||
}
|
||||
|
||||
config = require('./config.js')
|
||||
load()
|
||||
bot.on('error', error => {
|
||||
console.log((error))
|
||||
})
|
||||
}
|
||||
|
||||
checkConfig()
|
||||
|
||||
process.on('uncaughtException', (e) => {
|
||||
console.log('uncaught ' + e.stack)
|
||||
})
|
||||
|
||||
|
||||
@@ -6,41 +6,34 @@ function inject (bot) {
|
||||
if (data.type !== 'minecraft:chat') return
|
||||
|
||||
const plainMessage = bot.getMessageAsPrismarine(data.contents)?.toString()
|
||||
if (!plainMessage.startsWith(bot.commandManager.MainPrefix) && (!plainMessage.startsWith(bot.commandManager.SecondaryPrefix) && (!plainMessage.startsWith(bot.commandManager.TertiaryPrefix)))) return
|
||||
// else if (!plainMessage.startsWith(bot.commandManager.prefix2)) return
|
||||
// MainPrefix: "~",
|
||||
// SecondaryPrefix:'%',
|
||||
//TertiaryPrefix:'@'
|
||||
|
||||
const command = plainMessage.substring(bot.commandManager.MainPrefix.length || plainMessage.substring(bot.commandManager.SecondaryPrefix.length || plainMessage.substring(bot.commandManager.TertiaryPrefix.length))) // if the prefixes are the same length just make it 1 or the length
|
||||
/*
|
||||
lifes sus
|
||||
*/
|
||||
if (!plainMessage.startsWith(bot.commandManager.prefix)) return
|
||||
const command = plainMessage.substring(bot.commandManager.prefix.length)
|
||||
|
||||
const source = new CommandSource(data.sender, { discord: false, console: false }, true)
|
||||
source.sendFeedback = message => {
|
||||
const prefix = {
|
||||
translate: '[%s%s%s] \u203a ',
|
||||
bold: false,
|
||||
color: 'dark_gray',
|
||||
color: 'white',
|
||||
with: [
|
||||
{
|
||||
color: 'dark_purple',
|
||||
text: 'FNF',
|
||||
bold:true,
|
||||
hoverEvent: { action:"show_text", value: `${process.env["buildstring"]}\n${process.env["FoundationBuildString"]}`},
|
||||
hoverEvent: { action:"show_text", value: `${process.env["buildstring"]}`},
|
||||
clickEvent: bot.options.Core.customName ? { action: 'open_url', value: bot.options.Core.customName } : undefined,
|
||||
},
|
||||
{
|
||||
color: 'aqua',
|
||||
text: 'Boyfriend', bold:true,
|
||||
clickEvent: bot.options.discord.invite ? { action: 'open_url', value: bot.options.discord.invite } : undefined, hoverEvent: { action:"show_text", value: `Bot Username: ${bot.username}\nBot UUID: ${bot.uuid}\nServer Host: ${bot.options.host}:${bot.options.port}\nBot Minecraft Java Version: ${bot.options.version}`},
|
||||
clickEvent: bot.options.discord.invite ? { action: 'open_url', value: bot.options.discord.invite } : undefined, hoverEvent: { action:"show_text", value: `${process.env["FoundationBuildString"]}`},
|
||||
},
|
||||
{ color: 'dark_red',
|
||||
text: 'Bot',
|
||||
bold:true,
|
||||
clickEvent: bot.options.discord.invite ? { action: 'open_url', value: 'https://code.chipmunk.land' } : undefined,
|
||||
hoverEvent: { action:"show_text", value: '§aMan i like frogs - _ChipMC_'},
|
||||
},//§aMan i like frogs - _ChipMC_
|
||||
},
|
||||
|
||||
{ color: 'green', text: command.split(' ')[0] }
|
||||
]
|
||||
|
||||
+3
-12
@@ -15,11 +15,10 @@ async 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{CustomName: '{"text":"${bot.options.Core.customName}","color":"dark_red","clickEvent":{"action":"open_url","value":"${bot.options.Core.customName}"}}'} destroy`)
|
||||
|
||||
bot.command(`fill ${pos.x + start.x} ${pos.y + start.y} ${pos.z + start.z} ${pos.x + end.x} ${pos.y + end.y} ${pos.z + end.z} repeating_command_block{CustomName: '{"text":"${bot.options.Core.customName}","color":"dark_red","clickEvent":{"action":"open_url","value":"${bot.options.Core.customName}"}}'} destroy`)
|
||||
},
|
||||
|
||||
|
||||
move (pos = bot.position) {
|
||||
bot.core.position = {
|
||||
x: Math.floor(pos.x / 16) * 16,
|
||||
@@ -68,21 +67,13 @@ async function inject (bot, options) {
|
||||
bot.core.incrementCurrentBlock()
|
||||
|
||||
// added .substring(0, 32767) so it won't kick the bot if the command is too long.
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
if (!bot.options.Core.core) return
|
||||
bot.on('move', () => {
|
||||
bot.core.move(bot.position)
|
||||
//setTimeout(() => bot.core.run('say hi'), 100)
|
||||
})
|
||||
bot.on('packet.login', (data) =>{
|
||||
const timer = setInterval(() => {
|
||||
bot.core.refill()
|
||||
}, 180000)
|
||||
bot.on('end', (bot) => {
|
||||
clearInterval(timer)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
module.exports = inject
|
||||
|
||||
+71
-122
@@ -1,13 +1,10 @@
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const CommandError = require('../CommandModules/command_error.js')
|
||||
//check command_source
|
||||
//it would be both the command_source.js and command_manager.js files
|
||||
|
||||
function inject (bot, options) {
|
||||
bot.commandManager = {
|
||||
MainPrefix: options.commands?.MainPrefix ?? 'default',
|
||||
SecondaryPrefix: options.commands?.SecondaryPrefix ?? 'default',
|
||||
TertiaryPrefix: options.commands?.TertiaryPrefix ?? 'default',
|
||||
prefix: options.commands?.prefix ?? 'default',
|
||||
commands: {},
|
||||
amogus: [],
|
||||
//ohio
|
||||
@@ -16,141 +13,84 @@ function inject (bot, options) {
|
||||
//Unknown command. Type "/help" for help
|
||||
const now = new Date().toLocaleString("en-US",{timeZone:"America/CHICAGO"})
|
||||
try {
|
||||
if (!command || !command.execute) throw new CommandError({ translate: `Unknown command %s. Type "${bot.options.commands.MainPrefix}help" for help or click on this for the command`, with: [commandName], clickEvent: bot.options.Core.customName ? { action: 'suggest_command', value: `${bot.options.commands.MainPrefix}help` } : undefined})//ohio
|
||||
|
||||
|
||||
|
||||
if (command.trustLevel > 0){
|
||||
const event = source?.discordMessageEvent
|
||||
|
||||
const roles = event?.member?.roles?.cache
|
||||
|
||||
// message.member.displayName
|
||||
//const hash = `${args[0]}` // this is undefined
|
||||
//const owner = `${args[0]}`
|
||||
// const hash = `${args[0]}`
|
||||
// const owner = `${args[0]}`
|
||||
if(
|
||||
source?.sources?.discord &&
|
||||
command.trustLevel === 1 &&
|
||||
!roles?.some(role => role?.name == 'trusted' || role?.name == 'FNFBoyfriendBot Owner') ? true : false
|
||||
) throw new CommandError({text:'You are not Trusted!', color:'red'})
|
||||
if (
|
||||
!source?.sources?.discord &&
|
||||
command.trustLevel === 1 &&
|
||||
args[0] !== bot.hash &&
|
||||
args[0] !== bot.owner &&
|
||||
args[0] !== bot.hashing.hash
|
||||
) throw new CommandError({text:'Invalid Hash or Invalid Owner Hash', color:'red'})
|
||||
bot.hashing.updateHash()
|
||||
const now = new Date().toLocaleString("en-US",{timeZone:"America/CHICAGO"})
|
||||
const player = source?.player?.profile?.name
|
||||
const uuid = source?.player?.uuid
|
||||
if (!command || !command.execute) throw new CommandError({ translate: `Unknown command %s. Type "${bot.options.commands.prefix}help" for help or click on this for the command`, with: [commandName], clickEvent: bot.options.Core.customName ? { action: 'suggest_command', value: `${bot.options.commands.prefix}help` } : undefined})
|
||||
//command.unknown.argument command.unknown.command
|
||||
//command.context.here
|
||||
// let hash = 1
|
||||
// let owner = 2
|
||||
if (command.consoleOnly && !source.sources.console) throw new CommandError({ translate: 'This command can only be executed via console', color: 'blue' })
|
||||
//command.hashOnly && command.ownerOnly && args.length !== 0 && source.hash && source.owner
|
||||
if (command.hashOnly && args.length === 0) throw new CommandError({ translate: 'Please provide a hash or a OwnerHash', color: 'red' })
|
||||
|
||||
if (command.hashOnly && source.hash) {
|
||||
// debug
|
||||
// console.log(`${args} args0 ${args[0]}`) //too sus
|
||||
const hash = `${args[0]}` // this is undefined
|
||||
const owner = `${args[0]}`
|
||||
//\x1b[0m\x1b[91m
|
||||
//console.log(hash)
|
||||
const now = new Date().toLocaleString("en-US",{timeZone:"America/CHICAGO"})
|
||||
const player = source.player.profile.name
|
||||
const uuid = source.player.uuid
|
||||
const time = new Date().toLocaleTimeString("en-US", {timeZone:"America/CHICAGO"})
|
||||
const date = new Date().toLocaleDateString("en-US", {timeZone:"America/CHICAGO"})
|
||||
|
||||
bot.console.hash = function (error, source) {
|
||||
console.log(`<\x1b[0m\x1b[35m${time} \x1b[0m\x1b[96m${date}\x1b[0m> [${bot.options.host}:${bot.options.port}\x1b[0m] ` + `[\x1b[0m\x1b[92mHash\x1b[0m]: \x1b[0m\x1b[92mPlayer\x1b[0m: ${player}, \x1b[0m\x1b[92mUUID\x1b[0m:${uuid}, \x1b[0m\x1b[92mHash\x1b[0m:${bot.hash || bot.hashing.hash}\x1b[0m]` )
|
||||
}
|
||||
bot.console.discordHash = function (error, source) {
|
||||
console.log(`<\x1b[0m\x1b[35m${time} \x1b[0m\x1b[96m${date}\x1b[0m> [${bot.options.host}:${bot.options.port}\x1b[0m] ` + `[\x1b[0m\x1b[92mHash\x1b[0m]: \x1b[0m\x1b[92mPlayer\x1b[0m: ${player}, \x1b[0m\x1b[92mUUID\x1b[0m:${uuid}, \x1b[0m\x1b[92mHash\x1b[0m:${bot.hashing.hash}\x1b[0m]` )
|
||||
console.log(`<\x1b[0m\x1b[35m${time} \x1b[0m\x1b[96m${date}\x1b[0m> [${bot.options.host}:${bot.options.port}\x1b[0m] ` + `[\x1b[0m\x1b[92mHash\x1b[0m]: \x1b[0m\x1b[92mPlayer\x1b[0m: ${player}, \x1b[0m\x1b[92mUUID\x1b[0m:${uuid}, \x1b[0m\x1b[92mHash\x1b[0m:${bot.hash}\x1b[0m]` )
|
||||
}
|
||||
bot.console.ownerHash = function (error, source) {
|
||||
console.log(`<\x1b[0m\x1b[35m${time} \x1b[0m\x1b[96m${date}\x1b[0m> [${bot.options.host}:${bot.options.port}\x1b[0m] ` + `[\x1b[0m\x1b[31mOwnerHash\x1b[0m]: \x1b[0m\x1b[92mPlayer\x1b[0m: ${player}, \x1b[0m\x1b[92mUUID\x1b[0m:${uuid}, \x1b[0m\x1b[31mOwnerHash\x1b[0m:${bot.owner}\x1b[0m]` )
|
||||
}
|
||||
if (args[0] === bot.hash) {
|
||||
bot.console.hash()
|
||||
}
|
||||
else if (args[0] === bot.owner) {
|
||||
} else if (args[0] === bot.owner) {
|
||||
bot.console.ownerHash()
|
||||
}
|
||||
if (
|
||||
source?.sources?.discord &&
|
||||
command.trustLevel === 2 &&
|
||||
!roles?.some(role => role.name === 'FNFBoyfriendBot Owner')
|
||||
) throw new CommandError({text:'You are not the Owner!', color:'dark_red'})
|
||||
const owner = `${args[0]}`
|
||||
if (
|
||||
!source?.sources?.discord &&
|
||||
command.trustLevel === 2 && owner !== bot.owner
|
||||
)throw new CommandError({text: 'Invalid Owner Hash', color:'dark_red'})
|
||||
|
||||
if (command.trustLevel === 3 && !source?.sources?.console) throw new CommandError({ translate: 'This command can only be executed via console', color: 'blue' })
|
||||
//if ()
|
||||
}// if (command.consoleOnly && !source.sources.console) throw new CommandError({ translate: 'This command can only be executed via console', color: 'blue' })
|
||||
//(hash !== bot.hash && owner !== bot.owner
|
||||
//command.unknown.argument command.unknown.command
|
||||
//command.context.here
|
||||
// let hash = 1
|
||||
// let owner = 2
|
||||
|
||||
//command.hashOnly && command.ownerOnly && args.length !== 0 && source.hash && source.owner
|
||||
// if (command.hashOnly && args.length === 0) throw new CommandError({ translate: 'Please provide a hash or a OwnerHash', color: 'red' })
|
||||
|
||||
//<\x1b[0m\x1b[35m${time} \x1b[0m\x1b[96m${date}\x1b[0m> [${bot.options.host}:${bot.options.port}\x1b[0m] ` + `[\x1b[0m\x1b[92mHash\x1b[0m]: \x1b[0m\x1b[92mPlayer\x1b[0m: ${player}, \x1b[0m\x1b[92mUUID\x1b[0m:${uuid}, \x1b[0m\x1b[92mHash\x1b[0m:${bot.hash}\x1b[0m]`
|
||||
// actual hash
|
||||
console.log(bot.hash) // actual hash
|
||||
//but look in hashing.js
|
||||
//im looking through chomensjs's command handler for reference
|
||||
//💀
|
||||
// <\x1b[0m\x1b[35m${time} \x1b[0m\x1b[96m${date}\x1b[0m> [${bot.options.host}:${bot.options.port}\x1b[0m] ` + `[\x1b[0m\x1b[31mOwnerHash\x1b[0m]: \x1b[0m\x1b[92mPlayer\x1b[0m: ${player}, \x1b[0m\x1b[92mUUID\x1b[0m:${uuid}, \x1b[0m\x1b[31mOwnerHash\x1b[0m:${bot.owner}\x1b[0m]
|
||||
if (hash !== bot.hash && owner !== bot.owner) throw new CommandError({ translate: 'Invalid hash or Invalid OwnerHash', color: 'red' }) // so true
|
||||
//message?.member?.displayName
|
||||
bot.updatehash
|
||||
bot.updateowner
|
||||
}else if (command.hashOnly && source.sources.discord) {
|
||||
//const event = source.discordMessageEvent
|
||||
|
||||
//command.hashOnly && source.sources.discord
|
||||
//supposed to be a command error for invalid hash
|
||||
// if (command.hashOnly && args.length === 0) throw new CommandError({ translate: 'Please provide a hash or a OwnerHash', color: 'red' })
|
||||
|
||||
// {text:'Invalid Trusted hash or invalid Owner Hash', color:'red'}
|
||||
// you cant do a empty if
|
||||
// but i didnt know it can be just undefined :skull:
|
||||
//sus
|
||||
//commented smh out about and ig that worked
|
||||
// sus
|
||||
// if("e") {} // ok
|
||||
// idfk how to explain but it does
|
||||
// real (there was no if)
|
||||
const roles = null.member?.roles?.cache
|
||||
|
||||
const hasRole = roles.some(role => role.name === 'trusted'|| role.name === 'FNFBoyfriendBot Owner')
|
||||
|
||||
// isnt it if(something) {} or i
|
||||
//if(
|
||||
if (!hasRole) throw new CommandError({ translate: 'You are not trusted!' })
|
||||
}//source.discordMessageEvent.event.member.roles?.cache
|
||||
|
||||
/*
|
||||
else if (command.owner === bot.hash === true){
|
||||
throw new CommandError({ translate: 'THATS A TRUSTED HASH NOT A OWNER HASH!', color: 'dark_red' })
|
||||
}
|
||||
*/
|
||||
|
||||
// )//tf
|
||||
|
||||
if (command.ownerOnly && !source.owner) {
|
||||
// debug
|
||||
// console.log(`${args} args0 ${args[0]}`) //too sus
|
||||
const owner = `${args[0]}` // this is undefined
|
||||
if (owner && args.length === 0) throw new CommandError({ translate: 'Please provide a OwnerHash', color: 'dark_red' })
|
||||
console.log(bot.owner)
|
||||
if (owner === bot.hash){
|
||||
throw new CommandError({ translate: 'THATS A TRUSTED HASH NOT A OWNER HASH!', color: 'dark_red' })
|
||||
}
|
||||
if (owner !== bot.owner) throw new CommandError({ translate: 'Invalid Owner hash', color: 'dark_red' })
|
||||
bot.updateowner
|
||||
}
|
||||
|
||||
else if (command.owner && source.sources.discord) {
|
||||
// const event = source.discordMessageEvent
|
||||
|
||||
/*
|
||||
if (command.trustLevel > 0) {
|
||||
const discordRoles = message.member?.roles?.cache
|
||||
const roles = message.member?.roles?.cache
|
||||
|
||||
const hasRole = roles.some(role => role.name === 'FNFBoyfriendBot Owner')
|
||||
|
||||
|
||||
if(
|
||||
sources.source.discord &&
|
||||
command.trustLevel === 1 &&
|
||||
!discordRoles.some((role) => role.name === 'trusted' ||
|
||||
role.name === 'FNFBoyfriendBot Owner')
|
||||
)throw new CommandError({text:'You are not trusted!', color:'red'})
|
||||
let hash
|
||||
let owner
|
||||
if (
|
||||
!sources.source.discord &&
|
||||
command.trustLevel === 1 &&
|
||||
args.shift() !== hash &&
|
||||
args.shift() !== owner
|
||||
)
|
||||
*/
|
||||
// just shift it out of the args (mabe would help with needing to do cloop e add 1 say hi)
|
||||
|
||||
//idfk
|
||||
//tf
|
||||
// why the fard did it include the comment in the eror it sent
|
||||
//so replace args[0] with arg.shift()
|
||||
// just do args.shift()
|
||||
// or mabe const hasharg = args.shift()
|
||||
// idk
|
||||
//aaa
|
||||
//expression expected
|
||||
//ik that but why tf is it erroring
|
||||
|
||||
// wat the fard
|
||||
// sus
|
||||
|
||||
if (!hasRole) throw new CommandError({ translate: 'You are not the Owner!' })
|
||||
}
|
||||
return command.execute({ bot, source, arguments: args })
|
||||
} catch (error) {
|
||||
const now = new Date().toLocaleString("en-US",{timeZone:"America/CHICAGO"})
|
||||
@@ -167,7 +107,7 @@ if (error instanceof CommandError) source.sendError(error._message)
|
||||
// else source.sendError({ text:String(error.stack), color:'red' })
|
||||
else source.sendError({ translate: 'command.failed', color:'red', hoverEvent: { action: 'show_text', contents: String(error.stack) } })
|
||||
if (source.sources.discord) {
|
||||
source.sendError(error)
|
||||
source.sendError(error.stack)
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -205,10 +145,19 @@ for (const filename of fs.readdirSync(path.join(__dirname, '../commands'))) {
|
||||
} catch (error) {
|
||||
console.error('Failed to load command', filename, ':', error)
|
||||
}
|
||||
|
||||
bot.commandManager.reload
|
||||
const amongerus = Object.keys(require.cache).filter(r => r.startsWith(path.resolve(`../commands`)));
|
||||
bot.commandManager.fileReload = amongerus.forEach(f => { // I guess too mabe forEach
|
||||
console.log(`Unloaded: ${f}`);
|
||||
delete require.cache[f];
|
||||
|
||||
bot.commandManager.register(command)
|
||||
})
|
||||
|
||||
if (process.env['anti-skid'] !== 'amogus is sus') {
|
||||
process.exit(0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = inject
|
||||
|
||||
+8
-18
@@ -1,5 +1,5 @@
|
||||
const CommandSource = require('../CommandModules/command_source')
|
||||
//const logger = require('../util/logger')
|
||||
//const log = require('../logger')
|
||||
|
||||
function inject (bot, options, context, source) {
|
||||
|
||||
@@ -33,15 +33,9 @@ bot.console.source,
|
||||
|
||||
|
||||
|
||||
|
||||
//probably gotta somehow have it get its username
|
||||
//tried that already didnt work just errored
|
||||
//profile or smh :shrug:
|
||||
// what does it have to be
|
||||
|
||||
if (line.startsWith('')){
|
||||
return bot.commandManager.executeString(
|
||||
bot.console.source,
|
||||
bot.console.source,
|
||||
'console ' + line.substring(0)
|
||||
)
|
||||
}
|
||||
@@ -141,10 +135,8 @@ const date = new Date().toLocaleDateString("en-US", {timeZone:"America/CHICAGO"}
|
||||
|
||||
// bot.username
|
||||
//const amogus = username,
|
||||
|
||||
//name: message?.member?.displayName
|
||||
const isConsole = bot.username ? true : false
|
||||
bot.console.source = new CommandSource( bot.username,{console:true, discord:false });
|
||||
//name: message?.member?.displayName
|
||||
bot.console.source = new CommandSource(null,{console:true, discord:false });
|
||||
bot.console.source.sendFeedback = message => {
|
||||
//profile:{displayName:bot.username}
|
||||
const ansi = bot.getMessageAsPrismarine(message)?.toAnsi()
|
||||
@@ -175,17 +167,15 @@ const date = new Date().toLocaleDateString("en-US", {timeZone:"America/CHICAGO"}
|
||||
|
||||
const now = new Date().toLocaleString("en-US",{timeZone:"America/CHICAGO"})
|
||||
// const logtag = (JSON.stringify({"text":"[LOGS]", "color":"#00FF00"}))
|
||||
const time2 = new Date().toLocaleTimeString("en-US", {timeZone:"America/CHICAGO"})
|
||||
const date2 = new Date().toLocaleDateString("en-US", {timeZone:"America/CHICAGO"})
|
||||
|
||||
//const prefix = `<${time2} ${date2}> [${bot.options.host}:${bot.options.port}] `
|
||||
|
||||
|
||||
if (!bot.options.input) return
|
||||
if (!bot.options.console) return
|
||||
bot.console.logs(`${ansi}`)
|
||||
|
||||
|
||||
})
|
||||
}
|
||||
}//const prefix = `<\x1b[0m\x1b[35m${time} \x1b[0m\x1b[96m${date}\x1b[0m> [${bot.options.host}:${bot.options.port}\x1b[0m] `
|
||||
}
|
||||
}
|
||||
module.exports = inject
|
||||
/*const message = `[${moment().format('DD/MM/YY HH:mm:ss')} ${prefix}§r] [${bot.server.host}] `
|
||||
|
||||
+2
-5
@@ -24,10 +24,7 @@ function inject (bot, options) {
|
||||
}
|
||||
|
||||
client.on('ready', (context) => {
|
||||
//setMaxListeners(Infinity)
|
||||
client.setMaxListeners(25)
|
||||
|
||||
bot.discord.channel = client.channels.cache.get(options.discord.channelId)
|
||||
bot.discord.channel = client.channels.cache.get(options.discord.channelId)
|
||||
bot.discord.channel.send(`\`\`\`\nStarting ${process.env["buildstring"]}......\n\`\`\``)
|
||||
bot.discord.channel.send(`\`\`\`\nFoundation: ${process.env["FoundationBuildString"]}\n\`\`\``)
|
||||
bot.discord.channel.send(`\`\`\`\nSuccessfully logged into discord as ${bot.discord.client.user.username}#${bot.discord.client.user.discriminator}\n\`\`\``)
|
||||
@@ -120,7 +117,7 @@ function inject (bot, options) {
|
||||
if (message.author.id === bot.discord.client.user.id) return
|
||||
|
||||
if (message.channel.id !== bot.discord.channel.id) return
|
||||
//
|
||||
|
||||
if (message.content.startsWith(bot.discord.commandPrefix)) { // TODO: Don't hardcode this
|
||||
const source = new CommandSource({ profile: { name: message?.member?.displayName } }, { discord: true, console: false }, false, message)
|
||||
|
||||
|
||||
+10
-78
@@ -15,19 +15,15 @@ function inject(bot) {
|
||||
owner = crypto.createHash('sha256').update(Math.floor(Date.now() / 10000) + ownerkey).digest('hex').substring(0, 16)
|
||||
bot.hash = hash
|
||||
bot.owner = owner
|
||||
|
||||
}, 2000)
|
||||
|
||||
function update() {
|
||||
hash = crypto.createHash('sha256').update(Math.floor(Date.now() / 10000) + trustedkey).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.owner = owner
|
||||
|
||||
}
|
||||
//this should work right?
|
||||
/*
|
||||
bot.discord.channel = client.channels.cache.get(options.discord.channelId)
|
||||
*/
|
||||
|
||||
// ok
|
||||
/*
|
||||
bot.on('end', () => {
|
||||
@@ -35,77 +31,13 @@ function inject(bot) {
|
||||
})
|
||||
*/
|
||||
}
|
||||
|
||||
let _hash = generateHash()
|
||||
const now = new Date().toLocaleString("en-US",{timeZone:"America/CHICAGO"})
|
||||
const time = new Date().toLocaleTimeString("en-US", {timeZone:"America/CHICAGO"})
|
||||
const date = new Date().toLocaleDateString("en-US", {timeZone:"America/CHICAGO"})
|
||||
|
||||
//bot.hashing = ''
|
||||
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\nTime: ' + time + ' ' + date + ' ' + '```' + '```ansi\n Hash for server ' + `${bot.options.host}:${bot.options.port}: ` + bot.hashing.hash + '\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.discord.client?.on('ready', () => {
|
||||
//bot.discord.client?.setMaxListeners(25)
|
||||
bot.hashing.discordChannel = bot.discord.client.channels.cache.get('1188677777336057987')
|
||||
//bot.hashing.discordChannel?.send()
|
||||
bot.hashing.discordChannel?.send('```ansi\nTime: ' + time + ' ' + date + ' ' + '```' + '```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')
|
||||
}
|
||||
module.exports = inject
|
||||
|
||||
|
||||
|
||||
|
||||
/* const crypto = require('crypto')
|
||||
|
||||
let _hash = generateHash()
|
||||
|
||||
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.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')
|
||||
}
|
||||
/* const interval = setInterval(() => {
|
||||
const normalKey = process.env['chomensjs_key']
|
||||
const ownerHashKey = process.env['chomensjs_owner_key']
|
||||
bot.hash = crypto.createHash('sha256').update(Math.floor(Date.now() / 10000) + normalKey).digest('hex').substring(0, 16)
|
||||
bot.ownerHash = crypto.createHash('sha256').update(Math.floor(Date.now() / 10000) + ownerHashKey).digest('hex').substring(0, 16)
|
||||
}, 2000)
|
||||
bot.on('end', () => {
|
||||
clearInterval(interval)
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
function messagelimit (bot, options) {
|
||||
let spamCount = 0
|
||||
setInterval(() => spamCount = 0, 1000 * 2)
|
||||
|
||||
bot.on('message', message => {
|
||||
if (message == (`${bot.options.commands.prefix} `) && spamCount > 300) {
|
||||
bot.tellraw('WTF spam detected rate limiting')
|
||||
return
|
||||
}
|
||||
spamCount++
|
||||
})
|
||||
}
|
||||
module.exports = messagelimit
|
||||
+1
-1
@@ -140,7 +140,7 @@ function inject (bot) {
|
||||
noteIndex = 0
|
||||
bot.core.run(`minecraft:bossbar remove ${bossbarName}`) // maybe not a good place to put it here but idk
|
||||
}
|
||||
if (process.env["buildstring"] !== "§5FridayNightFunkin§bBoyfriend§4Bot §8v5.0.2 §8Build:315")
|
||||
if (process.env["buildstring"] != "§5FridayNightFunkin§bBoyfriend§4Bot §8v5.0.0-Beta §8Build:290 Codename:§8Mono§fchrome")
|
||||
{
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
@@ -45,8 +45,8 @@ function inject (bot) {
|
||||
if (!target) return
|
||||
target.removePlayer = entry.removePlayer
|
||||
}
|
||||
}//
|
||||
if (process.env['FoundationBuildString'] !== 'Ultimate Foundation v2.0.2 Build:215')
|
||||
}
|
||||
if (process.env["Ultimate Foundation v2.0.0-Beta Build:190"])
|
||||
{
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
@@ -2,17 +2,18 @@ const mc = require('minecraft-protocol')
|
||||
|
||||
function reconnect (bot, options) {
|
||||
bot.reconnectDelay = options.reconnectDelay ?? 5200 // Set from 1000 to 5200 - yfd
|
||||
|
||||
bot.on('end', (reason) => {
|
||||
bot.username = ''
|
||||
bot.on('end', () => {
|
||||
if (bot.reconnectDelay < 0) return
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
|
||||
const client = options.client ?? mc.createClient(options)
|
||||
bot._client = client
|
||||
bot.emit('init_client', client)
|
||||
|
||||
bot._client = mc.createClient(options)
|
||||
bot.emit('init_client', bot._client)
|
||||
bot.setMaxListeners(Infinity)
|
||||
bot._client.setMaxListeners(Infinity)
|
||||
|
||||
}, bot.reconnectDelay)
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -28,7 +28,7 @@ let unmuted = false
|
||||
else if (stringmessage === "You have been unmuted.") unmuted = 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.MainPrefix}&8]`) {
|
||||
else if (stringmessage === `You now have the tag: &8[&bPrefix &4${bot.options.commands.prefix}&8]`) {
|
||||
prefix = true
|
||||
return
|
||||
}
|
||||
@@ -110,7 +110,7 @@ let unmuted = false
|
||||
if (!commandSpyEnabled && bot.options.selfcare.cspy) bot.command('commandspy:commandspy on')
|
||||
else if (!vanished && bot.options.selfcare.vanished) bot.core.run(`essentials:vanish ${bot.username} enable`)
|
||||
else if (unmuted && bot.options.selfcare.unmuted) bot.core.run(`essentials:mute ${bot.uuid}`)
|
||||
else if (!prefix && bot.options.selfcare.prefix) bot.command(`prefix &8[&bPrefix &4${bot.options.commands.MainPrefix}&8]`)
|
||||
else if (!prefix && bot.options.selfcare.prefix) bot.command(`prefix &8[&bPrefix &4${bot.options.commands.prefix}&8]`)
|
||||
else if (gameMode !== 1 && bot.options.selfcare.gmc) bot.command('gamemode creative @s[type=player]')
|
||||
else if (!skin && bot.options.selfcare.skin) bot.command('skin Parker2991')
|
||||
else if (!username && bot.options.selfcare.username) bot.command(`username ${bot.username}`)
|
||||
|
||||
Generated
-134
@@ -12,7 +12,6 @@
|
||||
"color-convert": "^2.0.1",
|
||||
"cowsay2": "^2.0.4",
|
||||
"discord.js": "^14.14.1",
|
||||
"dockerode": "^4.0.0",
|
||||
"dotenv": "^16.3.1",
|
||||
"isolated-vm": "^4.6.0",
|
||||
"minecraft-data": "^3.49.1",
|
||||
@@ -57,11 +56,6 @@
|
||||
"node": "16|| 18 || 20"
|
||||
}
|
||||
},
|
||||
"node_modules/@balena/dockerignore": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/@balena/dockerignore/-/dockerignore-1.0.2.tgz",
|
||||
"integrity": "sha512-wMue2Sy4GAVTk6Ic4tJVcnfdau+gx2EnG7S+uAEe+TWJFqE4YoWN4/H8MSLj4eYJKxGg26lZwboEniNiNwZQ6Q=="
|
||||
},
|
||||
"node_modules/@discordjs/builders": {
|
||||
"version": "1.7.0",
|
||||
"resolved": "https://registry.npmjs.org/@discordjs/builders/-/builders-1.7.0.tgz",
|
||||
@@ -397,14 +391,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"node_modules/bcrypt-pbkdf": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz",
|
||||
"integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==",
|
||||
"dependencies": {
|
||||
"tweetnacl": "^0.14.3"
|
||||
}
|
||||
},
|
||||
"node_modules/bl": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
|
||||
@@ -490,15 +476,6 @@
|
||||
"resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz",
|
||||
"integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA=="
|
||||
},
|
||||
"node_modules/buildcheck": {
|
||||
"version": "0.0.6",
|
||||
"resolved": "https://registry.npmjs.org/buildcheck/-/buildcheck-0.0.6.tgz",
|
||||
"integrity": "sha512-8f9ZJCUXyT1M35Jx7MkBgmBMo3oHTTBIPLiY9xyL0pl3T5RwcPEY8cUHr5LBNfu/fk6c2T4DJZuVM/8ZZT2D2A==",
|
||||
"optional": true,
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/camelcase": {
|
||||
"version": "4.1.0",
|
||||
"resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz",
|
||||
@@ -601,20 +578,6 @@
|
||||
"node": ">= 10"
|
||||
}
|
||||
},
|
||||
"node_modules/cpu-features": {
|
||||
"version": "0.0.9",
|
||||
"resolved": "https://registry.npmjs.org/cpu-features/-/cpu-features-0.0.9.tgz",
|
||||
"integrity": "sha512-AKjgn2rP2yJyfbepsmLfiYcmtNn/2eUvocUyM/09yB0YDiz39HteK/5/T4Onf0pmdYDMgkBoGvRLvEguzyL7wQ==",
|
||||
"hasInstallScript": true,
|
||||
"optional": true,
|
||||
"dependencies": {
|
||||
"buildcheck": "~0.0.6",
|
||||
"nan": "^2.17.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/debug": {
|
||||
"version": "4.3.4",
|
||||
"resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
|
||||
@@ -711,57 +674,6 @@
|
||||
"node": ">=16.11.0"
|
||||
}
|
||||
},
|
||||
"node_modules/docker-modem": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/docker-modem/-/docker-modem-5.0.1.tgz",
|
||||
"integrity": "sha512-vqrE/nrweCyzmCpVpdFRC41qS+tfTF+IoUKlTZr52O82urbUqdfyJBGWMvT01pYUprWepLr8IkyVTEWJKRTQSg==",
|
||||
"dependencies": {
|
||||
"debug": "^4.1.1",
|
||||
"readable-stream": "^3.5.0",
|
||||
"split-ca": "^1.0.1",
|
||||
"ssh2": "^1.11.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/docker-modem/node_modules/readable-stream": {
|
||||
"version": "3.6.2",
|
||||
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz",
|
||||
"integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==",
|
||||
"dependencies": {
|
||||
"inherits": "^2.0.3",
|
||||
"string_decoder": "^1.1.1",
|
||||
"util-deprecate": "^1.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/dockerode": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/dockerode/-/dockerode-4.0.0.tgz",
|
||||
"integrity": "sha512-3LF7/3MPz5+9RsUo91rD0MCcx0yxjC9bnbtgtVjOLKyKxlZSJ7/Kk3OPAgARlwlWHqXwAGYhmkAHYx7IwD0tJQ==",
|
||||
"dependencies": {
|
||||
"@balena/dockerignore": "^1.0.2",
|
||||
"docker-modem": "^5.0.0",
|
||||
"tar-fs": "~2.0.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/dockerode/node_modules/tar-fs": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.0.1.tgz",
|
||||
"integrity": "sha512-6tzWDMeroL87uF/+lin46k+Q+46rAJ0SyPGz7OW7wTgblI273hsBqk2C1j0/xNadNLKDTUL9BukSjB7cwgmlPA==",
|
||||
"dependencies": {
|
||||
"chownr": "^1.1.1",
|
||||
"mkdirp-classic": "^0.5.2",
|
||||
"pump": "^3.0.0",
|
||||
"tar-stream": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/dotenv": {
|
||||
"version": "16.3.1",
|
||||
"resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.3.1.tgz",
|
||||
@@ -1441,12 +1353,6 @@
|
||||
"resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz",
|
||||
"integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="
|
||||
},
|
||||
"node_modules/nan": {
|
||||
"version": "2.18.0",
|
||||
"resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz",
|
||||
"integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==",
|
||||
"optional": true
|
||||
},
|
||||
"node_modules/napi-build-utils": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz",
|
||||
@@ -4769,11 +4675,6 @@
|
||||
"resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz",
|
||||
"integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g=="
|
||||
},
|
||||
"node_modules/safer-buffer": {
|
||||
"version": "2.1.2",
|
||||
"resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz",
|
||||
"integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg=="
|
||||
},
|
||||
"node_modules/semver": {
|
||||
"version": "7.5.4",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
|
||||
@@ -4895,36 +4796,6 @@
|
||||
"npm": ">= 3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/split-ca": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/split-ca/-/split-ca-1.0.1.tgz",
|
||||
"integrity": "sha512-Q5thBSxp5t8WPTTJQS59LrGqOZqOsrhDGDVm8azCqIBjSBd7nd9o2PM+mDulQQkh8h//4U6hFZnc/mul8t5pWQ=="
|
||||
},
|
||||
"node_modules/ssh2": {
|
||||
"version": "1.14.0",
|
||||
"resolved": "https://registry.npmjs.org/ssh2/-/ssh2-1.14.0.tgz",
|
||||
"integrity": "sha512-AqzD1UCqit8tbOKoj6ztDDi1ffJZ2rV2SwlgrVVrHPkV5vWqGJOVp5pmtj18PunkPJAuKQsnInyKV+/Nb2bUnA==",
|
||||
"hasInstallScript": true,
|
||||
"dependencies": {
|
||||
"asn1": "^0.2.6",
|
||||
"bcrypt-pbkdf": "^1.0.2"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.16.0"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"cpu-features": "~0.0.8",
|
||||
"nan": "^2.17.0"
|
||||
}
|
||||
},
|
||||
"node_modules/ssh2/node_modules/asn1": {
|
||||
"version": "0.2.6",
|
||||
"resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz",
|
||||
"integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==",
|
||||
"dependencies": {
|
||||
"safer-buffer": "~2.1.0"
|
||||
}
|
||||
},
|
||||
"node_modules/statuses": {
|
||||
"version": "2.0.1",
|
||||
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz",
|
||||
@@ -5074,11 +4945,6 @@
|
||||
"node": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/tweetnacl": {
|
||||
"version": "0.14.5",
|
||||
"resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz",
|
||||
"integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA=="
|
||||
},
|
||||
"node_modules/typed-emitter": {
|
||||
"version": "1.4.0",
|
||||
"resolved": "https://registry.npmjs.org/typed-emitter/-/typed-emitter-1.4.0.tgz",
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
"color-convert": "^2.0.1",
|
||||
"cowsay2": "^2.0.4",
|
||||
"discord.js": "^14.14.1",
|
||||
"dockerode": "^4.0.0",
|
||||
"dotenv": "^16.3.1",
|
||||
"isolated-vm": "^4.6.0",
|
||||
"minecraft-data": "^3.49.1",
|
||||
|
||||
@@ -1,24 +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 = true, 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
|
||||
Reference in New Issue
Block a user