mirror of
https://code.chipmunk.land/Parker2991/NitoriBot/
synced 2026-11-30 06:05:40 -05:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6baf4c623b |
+18
-18
@@ -1,47 +1,47 @@
|
||||
// TODO: Maybe add more authors
|
||||
const bots = [
|
||||
{
|
||||
name: { text: 'HBot', color: 'aqua', bold:false },
|
||||
name: { text: 'HBot', color: 'aqua', bold:true },
|
||||
authors: ['hhhzzzsss'],
|
||||
exclaimer:'HBOT HARRYBUTT LMAOOOOOOOOOOOOOOOOO',
|
||||
foundation: 'java/mcprotocollib',
|
||||
prefixes: ['#']
|
||||
},
|
||||
{
|
||||
name: [{ text: 'Evil', color: 'dark_red', bold:false }, {text:'Bot', color:'dark_purple'}],
|
||||
name: [{ text: 'Evil', color: 'dark_red' }, {text:'Bot', color:'dark_purple'}],
|
||||
authors: ['FusseligerDev'],
|
||||
exclaimer:'',
|
||||
foundation: 'Java/Custom',
|
||||
prefixes: ['!']
|
||||
},
|
||||
{
|
||||
name: { text: 'SBot Java', color: 'white', bold:false }, // TODO: Gradient
|
||||
name: { text: 'SBot Java', color: 'white', bold:true }, // TODO: Gradient
|
||||
authors: ['evkc'],
|
||||
foundation: 'Java/MCProtocolLib',
|
||||
prefixes: [':']
|
||||
},
|
||||
{
|
||||
name: { text: 'SBot Rust', color: 'white', bold:false}, // TODO: Gradient
|
||||
name: { text: 'SBot Rust', color: 'white', bold:true }, // TODO: Gradient
|
||||
authors: ['evkc'],
|
||||
foundation: 'Rust',
|
||||
prefixes: ['re:']
|
||||
},
|
||||
{
|
||||
name: { text: 'Z-Boy-Bot', color: 'dark_purple', bold:false }, // TODO: Gradient
|
||||
name: { text: 'Z-Boy-Bot', color: 'dark_purple' }, // TODO: Gradient
|
||||
exclaimer: 'Most likely skidded along with kbot that the dev used',
|
||||
authors: ['Romnci'],
|
||||
foundation: 'NodeJS/mineflayer or Java/mcprotocollib idfk',
|
||||
prefixes: ['Z]']
|
||||
},
|
||||
{
|
||||
name: { text: 'ABot', color: 'gold', bold:false }, // TODO: Gradient
|
||||
name: { text: 'ABot', color: 'gold', bold:true }, // TODO: Gradient
|
||||
exclaimer: '',
|
||||
authors: ['yfd'],
|
||||
foundation: 'NodeJS/Node-Minecraft-Protocol',
|
||||
prefixes: ['<']
|
||||
},
|
||||
{
|
||||
name: { text: 'FardBot', color: 'light_purple', bold:false },
|
||||
name: { text: 'FardBot', color: 'light_purple' },
|
||||
authors: ['_yfd'],
|
||||
exclaimer: 'bot is dead lol',
|
||||
foundation: 'NodeJS/Mineflayer',
|
||||
@@ -49,7 +49,7 @@ const bots = [
|
||||
},
|
||||
|
||||
{
|
||||
name: { text: 'ChipmunkBot', color: 'green', bold:false },
|
||||
name: { text: 'ChipmunkBot', color: 'green' },
|
||||
authors: ['_ChipMC_'],
|
||||
exclaimer: 'chips? also shoutout to chip and chayapak for helping in the rewrite',
|
||||
|
||||
@@ -57,19 +57,19 @@ const bots = [
|
||||
prefixes: ["'", "/'"]
|
||||
},
|
||||
{
|
||||
name: { text: 'ChipmunkBot Old', color: 'green', bold:false },
|
||||
name: { text: 'ChipmunkBot Old', color: 'green' },
|
||||
authors: ['_ChipMC_'],
|
||||
foundation: 'NodeJS/Node-Minecraft-Protocol',
|
||||
|
||||
},
|
||||
{
|
||||
name: { text: 'TestBot', color: 'aqua', bold:false },
|
||||
name: { text: 'TestBot', color: 'aqua' },
|
||||
authors: ['Blackilykat'],
|
||||
foundation: 'Java/MCProtocolLib',
|
||||
prefixes: ["-"]
|
||||
},
|
||||
{
|
||||
name: { text: 'UBot', color: 'grey', bold:false },
|
||||
name: { text: 'UBot', color: 'grey' },
|
||||
authors: ['HexWoman'],
|
||||
exclaimer: 'UwU OwO',
|
||||
|
||||
@@ -77,28 +77,28 @@ const bots = [
|
||||
prefixes: ['"']
|
||||
},
|
||||
{
|
||||
name: { text: 'ChomeNS Bot Java', color: 'yellow', bold:false},
|
||||
name: { text: 'ChomeNS Bot Java', color: 'yellow'},
|
||||
authors: ['chayapak'],
|
||||
exclaimer: 'wow its my bot !! ! 4374621q43567%^&#%67868-- chayapak',
|
||||
foundation: 'Java/MCProtocolLib',
|
||||
prefixes: ['*', 'cbot ', '/cbot ']
|
||||
},
|
||||
{
|
||||
name: { text: 'ChomeNS Bot NodeJS', color: 'yellow', bold:false},
|
||||
name: { text: 'ChomeNS Bot NodeJS', color: 'yellow'},
|
||||
authors: ['chayapak'],
|
||||
|
||||
foundation: 'NodeJS/Node-Minecraft-Protocol',
|
||||
prefixes: ['*', 'cbot', '/cbot']
|
||||
},
|
||||
{
|
||||
name: { text: 'RecycleBot', color: 'dark_green', bold:false},
|
||||
name: { text: 'RecycleBot', color: 'dark_green'},
|
||||
foundation: ['MorganAnkan'],
|
||||
exclaimer: 'nice bot',
|
||||
language: 'NodeJS/node-minecraft-protocol',
|
||||
prefixes: ['=']
|
||||
},
|
||||
{
|
||||
name: { text: 'ManBot', color: 'dark_green' , bold:false },
|
||||
name: { text: 'ManBot', color: 'dark_green' , },
|
||||
exclaimer: '(more like men bot :skull:) OH HAAAAAAAAAAAAAAIIILL LOGINTIMEDOUT',
|
||||
authors: ['Man/LogintimedOut'],
|
||||
foundation: 'NodeJS/mineflayer',
|
||||
@@ -112,14 +112,14 @@ const bots = [
|
||||
prefixes: ['[']
|
||||
},
|
||||
{
|
||||
name: [{ text: 'Blurry', color: 'dark_purple' , bold:false}, { text: 'Bot', color: 'red' }],
|
||||
name: [{ text: 'Blurry', color: 'dark_purple'}, { text: 'Bot', color: 'red' }],
|
||||
exclaimer: '',
|
||||
authors: ['SirLennox'],
|
||||
foundation: 'Java/custom',
|
||||
prefixes: [',']
|
||||
},
|
||||
{
|
||||
name: [{ text: 'KittyCorp', color: 'yellow', bold:false }, { text: 'Bot', color: 'yellow' }],
|
||||
name: [{ text: 'KittyCorp', color: 'yellow' }, { text: 'Bot', color: 'yellow' }],
|
||||
exclaimer: '3 words ginlang is gay',
|
||||
authors: ['ginlang , G6_, ArrayBuffer, and i guess more??'],
|
||||
foundation: 'NodeJS/node-minecraft-protocol',
|
||||
@@ -134,7 +134,7 @@ const bots = [
|
||||
prefixes: ['~']
|
||||
},
|
||||
{
|
||||
name: [{ text:'FNF', color: 'dark_purple', bold: false}, {text:'Boyfriend', color: 'aqua', bold:false}, {text:'Bot', color:'dark_red', bold:false}, {text:' Mineflayer', color:'green', bold:false}],
|
||||
name: [{ text:'FNF', color: 'dark_purple', bold: false}, {text:'Boyfriend', color: 'aqua', bold:false}, {text:'Bot', color:'dark_red', bold:false}, {text:' Mineflayer', color:'green', bold:true}],
|
||||
authors: [{text:'Parker2991', color:'dark_red' }, {text:' _ChipMC_', color:'dark_green', bold:false }],
|
||||
exclaimer:'1037 LINES OF CODE WTFARD!??! also this version is in console commands only' ,
|
||||
foundation: 'NodeJS/mineflayer',
|
||||
|
||||
@@ -2,7 +2,7 @@ const CommandError = require('../CommandModules/command_error')
|
||||
module.exports = {
|
||||
name: 'calculator',
|
||||
description:['calculate maths'],
|
||||
execute (context) {
|
||||
execute (context) { // also theres a bomb under my house rn and i can hear it beepingidfk
|
||||
const bot = context.bot
|
||||
const args = context.arguments
|
||||
const cmd = {//test.js
|
||||
|
||||
@@ -267,13 +267,6 @@ const bots = [
|
||||
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',
|
||||
},
|
||||
]
|
||||
//back
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
module.exports = {
|
||||
name: 'discord',
|
||||
description:['discord link'],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const event = {
|
||||
|
||||
clickevent: { action:"open_url", value: `${context.bot.discord.invite}`},
|
||||
"color": "#5A5A5A",
|
||||
"translate": `%s`,
|
||||
"with": [
|
||||
{ "color": "green", "text": "Click here for the bots discord server link"},
|
||||
|
||||
]//
|
||||
}
|
||||
context.source.sendFeedback(event, false)
|
||||
}
|
||||
}
|
||||
@@ -1,161 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
const os = require('os')
|
||||
const path = require('path')
|
||||
const fs = require('fs/promises')
|
||||
const packageJSON = require("../package.json")
|
||||
async function getCpuModelName () {
|
||||
const cpuInfo = await fs.readFile('/proc/cpuinfo')
|
||||
const lines = cpuInfo.toString().split('\n')
|
||||
// among us way of doing it
|
||||
const modelName = lines.find((line) => line.startsWith('model name')).split('\t: ')
|
||||
return modelName[1]
|
||||
}
|
||||
module.exports = {
|
||||
name: 'info',
|
||||
description:['check the bots info. the args are version, discord, serverinfo, logininfo, uptime, memused, creators'],
|
||||
async execute (context) {
|
||||
const bot = context.bot
|
||||
const args = context.arguments
|
||||
const cmd = {//test.js
|
||||
translate: '[%s] ',
|
||||
bold: false,
|
||||
color: 'white',
|
||||
with: [
|
||||
{ color: 'gold', text: 'Info Cmd'},
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
/*context.source.sendFeedback(`${buildstring}`, false)
|
||||
context.source.sendFeedback(`${foundationbuildstring}`)
|
||||
context.source.sendFeedback('BotEngine:Node-Minecraft-Protocol', false)
|
||||
*/
|
||||
|
||||
|
||||
const buildstring = process.env['buildstring']
|
||||
const foundationbuildstring = process.env['FoundationBuildString']
|
||||
|
||||
switch (args[0]) {
|
||||
case 'version':
|
||||
context.source.sendFeedback({
|
||||
translate: '\n %s \n %s \n %s ',
|
||||
with: [
|
||||
{ color: "green", text: `${buildstring}`},
|
||||
{ color: "green", text: `${foundationbuildstring}`},
|
||||
{ color: "green", text: 'BotEngine:Node-Minecraft-Protocol'},
|
||||
]
|
||||
});
|
||||
|
||||
break
|
||||
case 'discord':
|
||||
context.source.sendFeedback({
|
||||
clickevent: { action:"open_url", value: `${context.bot.discord.invite}`},
|
||||
translate: '%s',
|
||||
with: [
|
||||
{ color: "green", text: `${context.bot.discord.invite}`},
|
||||
]
|
||||
});
|
||||
|
||||
break
|
||||
case 'serverinfo':
|
||||
const discordJSVersion = packageJSON.dependencies["discord.js"];
|
||||
const MinecraftProtocolVersion = packageJSON.dependencies["minecraft-protocol"];
|
||||
|
||||
context.source.sendFeedback({
|
||||
translate: '\n %s \n %s \n %s \n %s \n %s \n %s \n %s \n %s \n %s \n %s',
|
||||
with: [
|
||||
{ color: "green", text: `Hostname: ${os.hostname()}`},
|
||||
{ color: "green", text: `Working Directory: ${path.join(__dirname, '..')}`},
|
||||
{ color: "green", text: `OS architecture: ${os.arch()}`},
|
||||
{ color: "green", text: `OS platform: ${os.platform()}`},
|
||||
{ color: "green", text: `OS name: ${os.version()}`},
|
||||
{ color: "green", text: `CPU cores: ${os.cpus().length}`},
|
||||
{ color: "green", text: `CPU model: ${await getCpuModelName()}`},
|
||||
{ color: "green", text: `Node js Version @${process.version}`},
|
||||
{ color: "green", text: `Minecraft-Protocol Version @${MinecraftProtocolVersion}`},
|
||||
{ color: "green", text: `Discord.js @${discordJSVersion}`},
|
||||
|
||||
]
|
||||
});
|
||||
break
|
||||
case 'logininfo':
|
||||
context.source.sendFeedback({
|
||||
translate: '\n %s \n %s \n %s \n %s',
|
||||
with: [
|
||||
{ color: "green", text: `Bot Username: ${bot.username}`},
|
||||
{ color: "green", text: `Minecraft Java Version: ${context.bot.options.version}`},
|
||||
{ color: "green", text: `Server: ${context.bot.options.host}`},
|
||||
{ color: "green", text: `Port: ${context.bot.options.port}`},
|
||||
]
|
||||
});
|
||||
|
||||
break
|
||||
break
|
||||
case 'uptime':
|
||||
function format(seconds){
|
||||
function pad(s){
|
||||
return (s < 10 ? '0' : '') + s;
|
||||
}
|
||||
var hours = Math.floor(seconds / (60*60));
|
||||
var minutes = Math.floor(seconds % (60*60) / 60);
|
||||
var seconds = Math.floor(seconds % 60);
|
||||
|
||||
return pad(`hours: ${hours}`) + ' ' + pad(`Mins: ${minutes}`) + ' ' + pad(`Seconds: ${seconds}`);
|
||||
}
|
||||
|
||||
var uptime = process.uptime();
|
||||
|
||||
context.source.sendFeedback({
|
||||
translate: '\n %s',
|
||||
with: [
|
||||
{ color: "green", text: `Bot Uptime: ${format(uptime)}`},
|
||||
|
||||
]
|
||||
});
|
||||
|
||||
|
||||
|
||||
case 'memused':
|
||||
const os = require('os')
|
||||
context.source.sendFeedback({
|
||||
translate: '\n %s',
|
||||
with: [
|
||||
{ color: "green", text: `§aMem §aused §a${Math.floor(os.freemem() / 1048576)} §aMiB §a/ §a${Math.floor(os.totalmem() / 1048576)} MiB`},
|
||||
|
||||
]
|
||||
});
|
||||
|
||||
break
|
||||
break
|
||||
|
||||
case 'creators':
|
||||
|
||||
context.source.sendFeedback({
|
||||
translate: '\n %s \n %s \n %s \n %s \n %s \n %s \n %s \n %s \n %s \n %s \n %s \n %s',
|
||||
with: [
|
||||
{ color: 'green', text: 'Thank you to all that helped!' },
|
||||
{ color: 'dark_red', text: 'Parker' },
|
||||
{ color: 'black', text: '2991' },
|
||||
|
||||
{ color: 'dark_green', text: '_ChipMC_' },
|
||||
|
||||
{ color: 'yellow', text: 'chayapak' },
|
||||
|
||||
{ color: 'light_purple', text: '_yfd' },
|
||||
{ color: 'green', text: 'ChomeNS Discord Server: https://discord.gg/xdgCkUyaA4' },
|
||||
{ color: 'green', text: 'FNFBoyfriendBot Discord Server: https://discord.gg/GCKtG4erux' },
|
||||
{ color: 'green', text: '(sadly chip doesnt have a discord server) _ChipMC_s Website https://chipmunk.land' },
|
||||
{ color: 'green', text: '_yfds discord server: https://discord.gg/BKYKBxfDrs' },
|
||||
{ color: 'green', text: 'chayapaks discord username: chayapak' },
|
||||
{ color: 'green', text: '_ChipMC_s discord username: chipmunkmc' },
|
||||
]
|
||||
});
|
||||
|
||||
break
|
||||
default:
|
||||
context.source.sendError([cmd, { text: 'Invalid action', color: 'dark_red', bold:false }])
|
||||
context.source.sendError([cmd, { text: 'the args for the info command is version, discord, serverinfo, logininfo, uptime, memused, creators', color: 'green', bold:false }])
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
module.exports = {
|
||||
name: 'logininfo',
|
||||
description:['check the bots logininfo for minecraft'],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const message = context.arguments.join(' ')
|
||||
|
||||
//context.bot.options.port
|
||||
context.source.sendFeedback(`Bot Username: ${bot.username}`)
|
||||
context.source.sendFeedback(`Minecraft Java Version: ${context.bot.options.version}`)
|
||||
context.source.sendFeedback(`Server: ${context.bot.options.host}`)
|
||||
context.source.sendFeedback(`Port: ${context.bot.options.port}`)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
const os = require('os')
|
||||
const path = require('path')
|
||||
const fs = require('fs/promises')
|
||||
const packageJSON = require("../package.json")
|
||||
async function getCpuModelName () {
|
||||
const cpuInfo = await fs.readFile('/proc/cpuinfo')
|
||||
const lines = cpuInfo.toString().split('\n')
|
||||
// among us way of doing it
|
||||
const modelName = lines.find((line) => line.startsWith('model name')).split('\t: ')
|
||||
return modelName[1]
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
name: 'serverinfo',
|
||||
description:['check server info'],
|
||||
async execute (context) {
|
||||
const discordJSVersion = packageJSON.dependencies["discord.js"];
|
||||
const MinecraftProtocolVersion = packageJSON.dependencies["minecraft-protocol"];
|
||||
|
||||
context.source.sendFeedback(`Hostname: ${os.hostname()}`, false)
|
||||
context.source.sendFeedback(`Working Directory: ${path.join(__dirname, '..')}`, false)
|
||||
context.source.sendFeedback(`OS architecture: ${os.arch()}`, false)
|
||||
context.source.sendFeedback(`OS platform: ${os.platform()}`, false)
|
||||
context.source.sendFeedback(`OS name: ${os.version()}`, false)
|
||||
context.source.sendFeedback(`CPU cores: ${os.cpus().length}`, false)
|
||||
context.source.sendFeedback(`CPU model: ${await getCpuModelName()}`, false)
|
||||
context.source.sendFeedback(`Node js Version @${process.version}`, false)
|
||||
context.source.sendFeedback(`Minecraft-Protocol Version @${MinecraftProtocolVersion}`, false)
|
||||
context.source.sendFeedback(`Discord.js @${discordJSVersion}`, false)
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
module.exports = {
|
||||
name: 'memused',
|
||||
description:['check mem used'],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const message = context.arguments.join(' ')
|
||||
const os = require('os')
|
||||
context.source.sendFeedback(`§aMem §aused §a${Math.floor(os.freemem() / 1048576)} §aMiB §a/ §a${Math.floor(os.totalmem() / 1048576)} MiB`, false)
|
||||
|
||||
}
|
||||
}
|
||||
/*
|
||||
var os = require('os');
|
||||
|
||||
console.log(os.cpus());
|
||||
console.log(os.totalmem());
|
||||
console.log(os.freemem())
|
||||
*/
|
||||
@@ -0,0 +1,24 @@
|
||||
module.exports = {
|
||||
name: 'uptime',
|
||||
description:['check how long the bot has been up for'],
|
||||
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const message = context.arguments.join(' ')
|
||||
function format(seconds){
|
||||
function pad(s){
|
||||
return (s < 10 ? '0' : '') + s;
|
||||
}
|
||||
var hours = Math.floor(seconds / (60*60));
|
||||
var minutes = Math.floor(seconds % (60*60) / 60);
|
||||
var seconds = Math.floor(seconds % 60);
|
||||
|
||||
return pad(`hours: ${hours}`) + ' ' + pad(`Mins: ${minutes}`) + ' ' + pad(`Seconds: ${seconds}`);
|
||||
}
|
||||
|
||||
var uptime = process.uptime();
|
||||
|
||||
context.source.sendFeedback(format(uptime))
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
const buildstring = process.env['buildstring']
|
||||
const foundationbuildstring = process.env['FoundationBuildString']
|
||||
const packageJSON = require("../package.json")
|
||||
module.exports = {
|
||||
name: 'version',
|
||||
description:['check the bot version'],
|
||||
|
||||
execute (context) {
|
||||
const discordJSVersion = packageJSON.dependencies["discord.js"];
|
||||
const MinecraftProtocolVersion = packageJSON.dependencies["minecraft-protocol"];
|
||||
|
||||
context.source.sendFeedback(`${buildstring}`, false)
|
||||
context.source.sendFeedback(`${foundationbuildstring}`)
|
||||
context.source.sendFeedback('BotEngine:Node-Minecraft-Protocol', false)
|
||||
|
||||
}
|
||||
}//idfk
|
||||
//i cant get it to show the npm version
|
||||
// where the fard are you gonna get that info from the process or whatever
|
||||
Reference in New Issue
Block a user