forked from afspiegeling/NitoriBot
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
199d49203c |
+7
-2
@@ -1,6 +1,11 @@
|
||||
node_modules
|
||||
logs
|
||||
midis
|
||||
config.js
|
||||
config.yml
|
||||
.env
|
||||
amog
|
||||
src/commands/kick.js
|
||||
src/modules/exploits.js
|
||||
src/commands/kick.js
|
||||
prototyping-crap/java/build/
|
||||
prototying-crap/java/.gradle/
|
||||
.git
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
exploits module was gitignored to prevent exploit leaks so the bot will not being able to run some commands without it
|
||||
please make a file called exploits.js in modules and add this
|
||||
```js
|
||||
function exploits (bot, options, context) {
|
||||
bot.exploits = {
|
||||
hoe: ''
|
||||
}
|
||||
}
|
||||
module.exports = exploits;
|
||||
```
|
||||
also src/commands/kick.js was gitignored so exploits wont be leaked
|
||||
v5.0.8 is not done yet!
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
Chess is a game played on an 8x8 checkered board, called a chessboard. To play chess, you move your pieces on the board. The goal is to checkmate the other player's king. You need to do it with your pieces.
|
||||
Rooks: horizontal and vertical
|
||||
Knights (horses): L shape (one square horizontal, two vertical) or (two squares horizontal, one vertical). Only piece that can jump over others.
|
||||
Bishops: diagonal
|
||||
Queens: Rook or bishop only
|
||||
King: one square anywhere (not into check)
|
||||
Pawns: one square, first move two squares, captures diagonally
|
||||
|
||||
Promotion: When pawns reach the last rank, they can promote to any piece other than pawn and kings.
|
||||
Castling: Move your king 2 squares towards the rook and move the rook next to the king on the other side. Neither should have moved in the game and the king can't be in check or go through it.
|
||||
En Passant: When your pawn is on the 5th rank away from your back rank and a pawn moves 2 forward and lands next to yours, you may capture the pawn like it only moved 1 square. It can only be done on the very next move.
|
||||
|
||||
|
||||
|
||||
Check: The king is under attack from one of the opponents pieces, and he must move out of check on the next move. The king never gets captured.
|
||||
Checkmate: The king is in check and can't escape. It results in a win for the checkmating player.
|
||||
Stalemate: The king can't move except into check. It results in a draw.
|
||||
|
||||
Board Setup: The board is oriented so that there is a light square in the bottom right corner of both players. The rooks go on the corners, then the knights go next to them, then the bishops, then the queen and king. The queen always goes on her own color. On the next row up the pawns go on every square.
|
||||
White always makes the first move.
|
||||
@@ -0,0 +1,184 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const filterList = require('../../filter.json');
|
||||
function filter (bot, options) {
|
||||
function join () {
|
||||
for (const players of filterList.players) {
|
||||
// if (bot.players?.find((player) => player.profile.name === players.username) === undefined) return undefined
|
||||
bot.on('message', message => {
|
||||
const stringmessage = bot.getMessageAsPrismarine(message)?.toString()
|
||||
if (
|
||||
stringmessage.startsWith(`${players.username} joined the game`)
|
||||
) {
|
||||
setTimeout(() => {
|
||||
bot.core.run(`/essentials:mute ${players.username} 10y Filtered by FNFBoyfriendBot`);
|
||||
bot.core.run(`/execute at @e run deop ${players.username}`);
|
||||
bot.core.run(`/execute at @e run gamemode spectator ${players.username}`);
|
||||
bot.core.run(`tellraw ${players.username} ${JSON.stringify(bot.exploits.invalidstring)}`)
|
||||
}, 1000)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
/* function login () {
|
||||
for (const players of filterList.players) {
|
||||
if (bot.players?.find((player) => player.profile.name === players.username) === undefined) return undefined
|
||||
|
||||
// } else {
|
||||
/* bot.on('login', data => {
|
||||
|
||||
if (bot.players.find((player) => player.profile.name === players.username).profile.username) {
|
||||
bot.core.run(`/essentials:mute ${bot?.players?.find((player) => player?.profile?.name === players?.username)?.profile?.username} 10y Filtered by FNFBoyfriendBot`);
|
||||
bot.core.run(`/execute at @e run ${players.username}`);
|
||||
bot.core.run(`/execute at @e run gamemode spectator ${players.username}`);
|
||||
// bot.core.run(`tellraw ${players.username} ${JSON.stringify(bot.exploits.invalidstring)}`)
|
||||
}
|
||||
})
|
||||
}
|
||||
}*/
|
||||
function message () {
|
||||
for (const players of filterList.players) {
|
||||
// if (bot.players?.find((player) => player.profile.name === players.username) === undefined) return undefined
|
||||
bot.on("parsed_message", (data) => {
|
||||
if (data.type !== "minecraft:chat") return;
|
||||
// console.log(Object.keys(data))
|
||||
if (data.sender.profile.name === players.username) {
|
||||
// bot.core.run(`/essentials:mute ${bot.players.find((player) => player?.profile?.name === players?.username)?.uuid} 10y`);
|
||||
setTimeout(() => {
|
||||
bot.core.run(`/essentials:mute ${players.username}`)
|
||||
}, 1000)
|
||||
}
|
||||
})
|
||||
}
|
||||
/*
|
||||
console.log((data.sender))
|
||||
{
|
||||
uuid: '85f5b68d-a567-3877-9701-3cd7404bc9d9',
|
||||
profile: { name: 'Parker2991', properties: [ [Object] ] },
|
||||
chatSession: undefined,
|
||||
gamemode: 1,
|
||||
listed: true,
|
||||
latency: 60,
|
||||
displayName: { extra: [ [Object], [Object] ], text: '' }
|
||||
}
|
||||
*/
|
||||
}
|
||||
function mute () {
|
||||
for (const players of filterList.players) {
|
||||
// if (bot.players?.find((player) => player.profile.name === players.username) === undefined) return undefined
|
||||
|
||||
bot.on('message', (message) => {
|
||||
const stringmessage = bot.getMessageAsPrismarine(message)?.toString()
|
||||
if (
|
||||
stringmessage.startsWith(`${bot.players.find((player) => player?.profile?.name === players?.username)?.profile?.name}: /essentials:mute ${bot.players.find((player) => player?.profile?.name === players?.username)?.profile?.name}`)
|
||||
||
|
||||
stringmessage === `${bot.players.find((player) => player?.profile?.name === players?.username)?.profile?.name}: /essentials:mute ${bot.players.find((player) => player?.profile?.name === players?.username)?.profile?.name}`
|
||||
||
|
||||
stringmessage === `${bot.players.find((player) => player?.profile?.name === players?.username)?.profile?.name}: /emute `
|
||||
||
|
||||
stringmessage === `${bot.players.find((player) => player?.profile?.name === players?.username)?.profile?.name}: /mute ${bot?.players?.find((player) => player?.profile?.name === players?.username)?.uuid}`
|
||||
||
|
||||
stringmessage.startsWith(`${bot.players.find((player) => player?.profile?.name === players?.username)?.profile?.name}: /emute ${bot.players.find((player) => player?.profile?.name === players?.username)?.profile?.name}`)
|
||||
||
|
||||
stringmessage.startsWith(`${bot.players.find((player) => player?.profile?.name === players?.username)?.profile?.name}: /mute ${bot.players.find((player) => player?.profile?.name === players?.username)?.profile?.name}`)
|
||||
/* ||
|
||||
stringmessage.includes(`${players.username}: `)*/
|
||||
) {
|
||||
setTimeout(() => {
|
||||
bot.core.run(`/essentials:mute ${bot.players.find((player) => player?.profile?.name === players?.username)?.uuid} 10y`);
|
||||
bot.core.run(`tellraw ${players.username} ${JSON.stringify(bot.exploits.invalidstring)}`)
|
||||
}, 1000)
|
||||
}
|
||||
})
|
||||
// }
|
||||
}
|
||||
}
|
||||
function gamemode () {
|
||||
for (const players of filterList.players) {
|
||||
// if (bot.players?.find((player) => player.profile.name === players.username) === undefined) return undefined
|
||||
bot.on('message', (message) => {
|
||||
const stringmessage = bot.getMessageAsPrismarine(message)?.toString();
|
||||
if (
|
||||
stringmessage.startsWith(`${bot.players.find((player) => player?.profile?.name === players?.username)?.profile?.name}: /gamemode creative`)
|
||||
||
|
||||
stringmessage.startsWith(`${bot.players.find((player) => player?.profile?.name === players?.username)?.profile?.name}: /minecraft:gamemode creative`)
|
||||
||
|
||||
stringmessage.startsWith(`${bot.players.find((player) => player?.profile?.name === players?.username)?.profile?.name}: /gmc`)
|
||||
||
|
||||
stringmessage.startsWith(`${bot.players.find((player) => player?.profile?.name === players?.username)?.profile?.name}: /egmc`)
|
||||
||
|
||||
stringmessage.startsWith(`${bot.players.find((player) => player?.profile?.name === players?.username)?.profile?.name}: /essentials:gamemode creative`)
|
||||
||
|
||||
stringmessage.startsWith(`${bot.players.find((player) => player?.profile?.name === players?.username)?.profile?.name}: /essentials:gm creative`)
|
||||
||
|
||||
stringmessage.startsWith(`${bot.players.find((player) => player?.profile?.name === players?.username)?.profile?.name}: /essentials:gmc creative`)
|
||||
||
|
||||
stringmessage.startsWith(`: /execute`) + stringmessage.endsWith(`gamemode creative ${players.username}`)
|
||||
||
|
||||
stringmessage.startsWith(`${players.username}: /egmc creative`)
|
||||
||
|
||||
stringmessage.startsWith(`${players.username}: /gmc creative`)
|
||||
||
|
||||
stringmessage.startsWith(`${players.username}: /egm creative`)
|
||||
||
|
||||
stringmessage.startsWith(`${players.username}: /egm creative`)
|
||||
||
|
||||
bot?.players?.find((player) => player?.profile?.name === players?.username)?.gamemode !== 3
|
||||
) {
|
||||
setTimeout(() => {
|
||||
// bot.core.run(`gamemode spectator bot?.players?.find((player) => player?.profile?.name === players?.username)?.profile.username}`)
|
||||
bot.core.run(`/gamemode spectator ${players.username}`);
|
||||
bot.core.run(`tellraw ${players.username} ${JSON.stringify(bot.exploits.invalidstring)}`)
|
||||
bot.core.run(`/execute at @e run deop ${players.username}`);
|
||||
}, 1000)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
function deop () {
|
||||
for (const players of filterList.players) {
|
||||
//if (bot.players?.find((player) => player.profile.name === players.username) === undefined) return undefined
|
||||
bot.on('message', (message) => {
|
||||
const stringmessage = bot.getMessageAsPrismarine(message)?.toString();
|
||||
if (
|
||||
stringmessage.startsWith(`${players.username}: /minecraft:op`)
|
||||
||
|
||||
stringmessage.startsWith(`${players.username}: /op ${players.username}`)
|
||||
||
|
||||
stringmessage.startsWith(`${players.username}: /minecraft:op ${players.username}`)
|
||||
||
|
||||
stringmessage.startsWith(`: /execute`) + stringmessage.endsWith(`op ${players.username}`)
|
||||
||
|
||||
stringmessage.includes(`${players.username}: `)
|
||||
) {
|
||||
setTimeout(() => {
|
||||
bot.core.run(`execute at @e run deop ${players.username}`)
|
||||
bot.core.run(`tellraw ${players.username} ${JSON.stringify(bot.exploits.invalidstring)}`)
|
||||
}, 1000)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
if (bot.options.isSavage) return
|
||||
join();
|
||||
gamemode();
|
||||
mute();
|
||||
// login();
|
||||
deop();
|
||||
message();
|
||||
}
|
||||
module.exports = filter;
|
||||
// stringmessage.startsWith(`${players.username}: /essentials:mute ${players.username}`)
|
||||
// stringmessage.startsWith(`${players.username}: /emute Parker2991`)
|
||||
// [chipmunkbot§: Made chipmunkbot a server operator]
|
||||
// stringmessage.startsWith(`${players.username}: /minecraft:op`)
|
||||
// stringmessage.startsWith(`${players.username}: /op ${players.username}`)
|
||||
// stringmessage.startsWith(`: /execute`) + stringmessage.endsWith(`op ${players.username}`)
|
||||
// stringmessage.startsWith(`${players.username}: /gmc`)
|
||||
// stringmessage.startsWith(`${players.username}: /egmc`)
|
||||
// stringmessage.startsWith(`${players.username}: /essentials:gamemode creative`)
|
||||
// stringmessage.startsWith(`${players.username}: /essentials:gm creative`)
|
||||
// stringmessage.startsWith(`${players.username}: /essentials:gmc creative`)
|
||||
// stringmessage.startsWith(`: /execute`) + stringmessage.endsWith(`gamemode creative ${players.username}`)
|
||||
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
{"players":[{"username":"Bu11D0g1337","ignorecase":false},{"username":"lluiiis__pb__","ignorecase":false}]}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
function hashGen () {
|
||||
const characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890`~!@#$%^&*()-_+={}[]\\|;:,.<>/?';
|
||||
let username = '';
|
||||
for (let i = 0; i < 16; i++ ) {
|
||||
const randomIndex = Math.floor(Math.random() * characters.length);
|
||||
username += characters[randomIndex];
|
||||
}
|
||||
return username;
|
||||
}
|
||||
console.log(hashGen())
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+6540
File diff suppressed because it is too large
Load Diff
+6539
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
while true; do
|
||||
echo "Starting FNFBoyfriendBot...."
|
||||
node --max-old-space-size=1000 --trace-warnings src/index.js
|
||||
# echo "Starting FNFBoyfriendBot...."
|
||||
node --max-old-space-size=1000 src/index.js
|
||||
sleep 1
|
||||
done
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
const CommandSource = require("../CommandModules/command_source");
|
||||
const CommandError = require("../CommandModules/command_error");
|
||||
//can i change the var?
|
||||
const { execSync } = require('child_process');
|
||||
function chat_command_handler(bot) {
|
||||
let ratelimit = 0
|
||||
bot.on("parsed_message", (data) => {
|
||||
if (data.type !== "minecraft:chat") return;
|
||||
|
||||
const prefixes = bot.Commands.prefixes;
|
||||
|
||||
prefixes.map((prefix) => {
|
||||
const plainMessage = bot
|
||||
.getMessageAsPrismarine(data.contents)
|
||||
?.toString();
|
||||
if (!plainMessage.startsWith(prefix)) return;
|
||||
|
||||
const command = plainMessage.substring(prefix.length); // if the prefixes are the same length just make it 1 or the length
|
||||
/*
|
||||
lifes sus
|
||||
*/
|
||||
const source = new CommandSource(data.sender,{ discord: false, console: false });
|
||||
bot.sendFeedback = (message) => {
|
||||
|
||||
if (bot.options.useChat) {
|
||||
bot.tellraw([message]);
|
||||
} else {
|
||||
bot.tellraw(["", message]);
|
||||
}
|
||||
|
||||
};
|
||||
bot.sendError = (message) => {
|
||||
bot.sendFeedback([{ text: '', color: `red` }, message], false)
|
||||
}
|
||||
try{
|
||||
|
||||
ratelimit++
|
||||
setTimeout(() => {
|
||||
ratelimit--
|
||||
}, 1000)
|
||||
if (ratelimit > bot.Commands.ratelimit) { // ,.
|
||||
bot.sendFeedback({text:'You are using commands too fast!',color:'dark_red'})
|
||||
// this isn't blocking running the command you know that right?
|
||||
} else {
|
||||
bot.commandManager.executeString(source, command);
|
||||
}//oh real
|
||||
|
||||
//can i change the variable name so its name isnt confusing?
|
||||
}catch(e){
|
||||
console.log(e.stack)
|
||||
|
||||
};
|
||||
});
|
||||
})//
|
||||
}
|
||||
module.exports = chat_command_handler;
|
||||
@@ -4,4 +4,4 @@ bot.chatDelay = function delay(ms) {
|
||||
}
|
||||
|
||||
}
|
||||
module.exports = chatDelay;
|
||||
module.exports = chatDelay;
|
||||
Generated
+583
-412
File diff suppressed because it is too large
Load Diff
+5
-10
@@ -1,25 +1,20 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"@tonejs/midi": "^2.0.28",
|
||||
"@vitalets/google-translate-api": "^9.2.0",
|
||||
"axios": "^1.6.8",
|
||||
"color-convert": "^2.0.1",
|
||||
"cowsay": "^1.6.0",
|
||||
"cowsay2": "^2.0.4",
|
||||
"discord.js": "^14.14.1",
|
||||
"discord.js": "^14.15.2",
|
||||
"dockerode": "^4.0.2",
|
||||
"dotenv": "^16.4.5",
|
||||
"final-stream": "^2.0.4",
|
||||
"http-proxy-agent": "^7.0.2",
|
||||
"isolated-vm": "^4.7.2",
|
||||
"matrix-js-sdk": "^31.6.1",
|
||||
"js-yaml": "^4.1.0",
|
||||
"minecraft-protocol": "^1.47.0",
|
||||
"moment-timezone": "^0.5.45",
|
||||
"prismarine-chat": "^1.10.0",
|
||||
"prettier": "^3.2.5",
|
||||
"prismarine-chat": "^1.10.1",
|
||||
"prismarine-registry": "^1.7.0",
|
||||
"readline": "^1.3.0",
|
||||
"stream": "^0.0.2",
|
||||
"urban-dictionary": "git+https://code.chipmunk.land/chipmunkMC/urban-dictionary.git",
|
||||
"weather-js": "^2.0.0",
|
||||
"wikipedia": "^2.1.2"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
const version = '1.20.4'
|
||||
const { fromNotch } = require('prismarine-chat')(version)
|
||||
const nbt = require('prismarine-nbt')
|
||||
//const msg = {"type":"compound","value":{"extra":{"type":"list","value":{"type":"compound","value":[{"extra":{"type":"list","value":{"type":"compound","value":[{"color":{"type":"string","value":"dark_gray"},"text":{"type":"string","value":"["}},{"color":{"type":"string","value":"aqua"},"text":{"type":"string","value":"Prefix: "}},{"color":{"type":"string","value":"dark_red"},"text":{"type":"string","value":"~"}},{"color":{"type":"string","value":"dark_gray"},"text":{"type":"string","value":"]"}},{"":{"type":"string","value":" "}}]}},"text":{"type":"string","value":""}},{"extra":{"type":"list","value":{"type":"compound","value":[{"color":{"type":"string","value":"red"},"text":{"type":"string","value":"FNFBoyfriendBot"}}]}},"text":{"type":"string","value":""}},{"":{"type":"string","value":":"}},{"":{"type":"string","value":" "}},{"extra":{"type":"list","value":{"type":"compound","value":[{"color":{"type":"string","value":"dark_purple"},"text":{"type":"string","value":"FNF"}},{"color":{"type":"string","value":"aqua"},"text":{"type":"string","value":"Boyfriend"}},{"color":{"type":"string","value":"dark_red"},"text":{"type":"string","value":"Bot "}},{"color":{"type":"string","value":"white"},"text":{"type":"string","value":"- "}},{"color":{"type":"string","value":"dark_red"},"text":{"type":"string","value":"Parker"}},{"color":{"type":"string","value":"black"},"text":{"type":"string","value":"2991"}}]}},"text":{"type":"string","value":""}}]}},"text":{"type":"string","value":""}}}
|
||||
const msg = {"type":"compound","value":{"extra":{"type":"list","value":{"type":"compound","value":[{"extra":{"type":"list","value":{"type":"compound","value":[{"bold":{"type":"byte","value":1},"color":{"type":"string","value":"dark_red"},"text":{"type":"string","value":"["}},{"bold":{"type":"byte","value":1},"color":{"type":"string","value":"red"},"text":{"type":"string","value":"OP"}},{"bold":{"type":"byte","value":1},"color":{"type":"string","value":"dark_red"},"text":{"type":"string","value":"] "}},{"color":{"type":"string","value":"red"},"text":{"type":"string","value":""}}]}},"text":{"type":"string","value":""}},{"extra":{"type":"list","value":{"type":"compound","value":[{"color":{"type":"string","value":"red"},"text":{"type":"string","value":"birdevent"}}]}},"text":{"type":"string","value":""}},{"":{"type":"string","value":":"}},{"":{"type":"string","value":" "}},{"":{"type":"string","value":"?"}}]}},"text":{"type":"string","value":""}}}
|
||||
function tryParse (json) {
|
||||
|
||||
}
|
||||
function processNbtMessage (msg) {
|
||||
if (!msg || msg.type === 'end') return null
|
||||
const simplified = nbt.simplify(msg)
|
||||
const json = JSON.stringify(simplified, (key, val) => {
|
||||
if (key === 'id' && Array.isArray(val)) return uuidFromIntArray(val)
|
||||
return val
|
||||
})
|
||||
return json
|
||||
}
|
||||
console.log(fromNotch(processNbtMessage(msg)).toAnsi())
|
||||
console.log(fromNotch(nbt.simplify(msg).extra).toAnsi())
|
||||
async function nbtChat() {
|
||||
|
||||
const { parsed, type } = await nbt.parse(msg)
|
||||
console.log(parsed)
|
||||
}
|
||||
//nbtChat()
|
||||
/*
|
||||
async function main(file) {
|
||||
const buffer = fs.readFileSync(file)
|
||||
const { parsed, type } = await nbt.parse(buffer)
|
||||
console.log('JSON serialized', JSON.stringify(parsed, null, 2))
|
||||
fs.createWriteStream('bigtest.nbt').write(nbt.writeUncompressed(parsed, type)) // Write it back
|
||||
}
|
||||
main('bigtest.nbt')
|
||||
*/
|
||||
@@ -0,0 +1,7 @@
|
||||
const fs = require('fs/promises');
|
||||
const path = require('path');
|
||||
const blacklist = require(path.join(__dirname, 'blacklist.json'));
|
||||
|
||||
for (const player of blacklist.players) {
|
||||
console.log('whos blacklisted?',[player]);
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"players": [
|
||||
"CynicalDev",
|
||||
"denisapain",
|
||||
"Pan_Poppo",
|
||||
"Parker2991"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
[{"text":"e"},{"text":"sus"},{"text":"amongus"}]
|
||||
@@ -0,0 +1,102 @@
|
||||
# i bet theres gonna be some whiny assholes complaining about this because config is .yml and not .js since most java bots use .yml and no other
|
||||
# javascript bot uses .yml, all i got to say is go cry somewhere else about it you wont change my mind, you little shit,
|
||||
# it looks cleaner than config.js - Parker2991
|
||||
|
||||
|
||||
# FNFBoyfriendBot Config
|
||||
# commands
|
||||
Commands:
|
||||
prefixes:
|
||||
- '!'
|
||||
colors:
|
||||
discord:
|
||||
error: "#ff0000"
|
||||
embed: "#00ffff"
|
||||
help:
|
||||
pub_lickColor: "#00FFFF"
|
||||
t_rustedColor: "dark_purple"
|
||||
own_herColor: "dark_red"
|
||||
error: "#FF0000"
|
||||
|
||||
# core
|
||||
Core:
|
||||
JSON: ""
|
||||
area:
|
||||
start:
|
||||
x: 0
|
||||
y: 0
|
||||
z: 0
|
||||
end:
|
||||
x: 15
|
||||
y: 0
|
||||
z: 15
|
||||
|
||||
#validation
|
||||
validation:
|
||||
discord:
|
||||
roles:
|
||||
trusted: "trusted"
|
||||
owner: "owner"
|
||||
channelId: "channel validation here" # for sending hashes to discord if someone is too lazy to add validation for the bot to their client
|
||||
trustedKey: "trusted key here"
|
||||
ownerKey: "owner key here"
|
||||
|
||||
#discord
|
||||
Discord:
|
||||
enabled: false
|
||||
invite: "https://discord.gg/GCKtG4erux"
|
||||
commandPrefix: "!"
|
||||
presence:
|
||||
name: "amongus"
|
||||
type: 4
|
||||
status: "online"
|
||||
|
||||
# console
|
||||
console:
|
||||
filelogging: false
|
||||
prefix: "c."
|
||||
|
||||
# bots
|
||||
bots :
|
||||
# isKaboom = running the bot in kaboom
|
||||
# isCreayun = running the bot in creayun
|
||||
# useChat = running the bot in chat and not core
|
||||
# usernameGen = regenerating the bot's username every join
|
||||
# endcredits = the bot advertising
|
||||
# serverName = the name of the server ofc
|
||||
# Console.ratelimit = the number of messages that the bot can read in a few seconds before rejoining this is used to prevent spam, i do not recommend setting it to Infinity
|
||||
# selfcare.interval = selfcare interval duh
|
||||
- host: "localhost"
|
||||
useChat: false
|
||||
isKaboom: true
|
||||
isCreayun: false
|
||||
usernameGen: true
|
||||
username: "FNFBoyfriendBot"
|
||||
version: "1.20.2"
|
||||
serverName: "localhost"
|
||||
reconnectDelay: 6000
|
||||
endcredits: false
|
||||
Console:
|
||||
enabled: true
|
||||
ratelimit: 25
|
||||
Core:
|
||||
enabled: true
|
||||
interval: 180000
|
||||
discord:
|
||||
channelId: ""
|
||||
log: false
|
||||
matrix:
|
||||
roomId: ""
|
||||
selfcare:
|
||||
vanished: true
|
||||
unmuted: true
|
||||
prefix: true
|
||||
cspy: true
|
||||
tptoggle: true
|
||||
skin: true
|
||||
gmc: true
|
||||
op: true
|
||||
nickname: true
|
||||
username: true
|
||||
god: true
|
||||
interval: 500
|
||||
@@ -0,0 +1,9 @@
|
||||
|
||||
|
||||
e
|
||||
e
|
||||
e
|
||||
e
|
||||
e
|
||||
e
|
||||
e
|
||||
@@ -0,0 +1,20 @@
|
||||
const fs = require("fs");
|
||||
|
||||
var data = fs.readFileSync("data.json");
|
||||
var myObject = JSON.parse(data);
|
||||
|
||||
let newData = {
|
||||
text: "sus"
|
||||
}
|
||||
myObject.push(newData);
|
||||
var newData2 = JSON.stringify(myObject);
|
||||
fs.rmSync("./data.json");
|
||||
fs.writeFile("data2.json", newData2, (err) => {
|
||||
if (err) throw err;
|
||||
console.log("New data added");
|
||||
});
|
||||
fs.rename('data2.json', 'data.json', (err) => {
|
||||
if (err) throw err;
|
||||
// console.log('Rename complete!');
|
||||
});
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
/*const playlists = [
|
||||
{
|
||||
"id" : "1",
|
||||
"owner_id" : "2",
|
||||
"song_ids" : [ "8", "32"]
|
||||
},
|
||||
{
|
||||
"id" : "2",
|
||||
"owner_id" : "3",
|
||||
"song_ids" : ["6", "8","11" ]
|
||||
}
|
||||
];*/
|
||||
const fs = require('fs');
|
||||
var data = require("./data.json");
|
||||
const e = data.splice('e', 1)
|
||||
const removePlayerById = (plists, text) =>
|
||||
plists.filter(player => player.text !== text);
|
||||
const result = removePlayerById(data, 2);
|
||||
console.log(result)
|
||||
// console.log(playerId)
|
||||
//}
|
||||
//remove()
|
||||
/*
|
||||
const fs = require("fs");
|
||||
|
||||
var data = fs.readFileSync("data.json");
|
||||
var myObject = JSON.parse(data);
|
||||
|
||||
let newData = {
|
||||
text: "sus"
|
||||
}
|
||||
myObject.push(newData);
|
||||
var newData2 = JSON.stringify(myObject);
|
||||
fs.rmSync("./data.json");
|
||||
fs.writeFile("data2.json", newData2, (err) => {
|
||||
if (err) throw err;
|
||||
console.log("New data added");
|
||||
});
|
||||
fs.rename('data2.json', 'data.json', (err) => {
|
||||
if (err) throw err;
|
||||
// console.log('Rename complete!');
|
||||
});
|
||||
|
||||
*/
|
||||
@@ -0,0 +1,2 @@
|
||||
const { haxe } = require('haxe')
|
||||
console.log(haxe())
|
||||
@@ -0,0 +1,70 @@
|
||||
/*
|
||||
* This file was generated by the Gradle 'init' task.
|
||||
*
|
||||
* This is a general purpose Gradle build.
|
||||
* To learn more about Gradle by exploring our Samples at https://docs.gradle.org/8.5/samples
|
||||
*/
|
||||
/*
|
||||
* This file was generated by the Gradle 'init' task.
|
||||
*/
|
||||
|
||||
plugins {
|
||||
id 'java'
|
||||
id 'java-library'
|
||||
id 'maven-publish'
|
||||
id 'com.github.johnrengelman.shadow' version '8.1.1'
|
||||
}
|
||||
|
||||
group = 'land.chipmunk.parker2991'
|
||||
version = 'v6.0.0-alpha(ff08479)'
|
||||
description = 'FNFBoyfriendBot'
|
||||
java.sourceCompatibility = JavaVersion.VERSION_17
|
||||
|
||||
repositories {
|
||||
mavenLocal()
|
||||
|
||||
mavenCentral()
|
||||
|
||||
maven {
|
||||
url = uri('https://repo.opencollab.dev/maven-snapshots/')
|
||||
}
|
||||
|
||||
maven {
|
||||
url = uri('https://repo.opencollab.dev/maven-releases/')
|
||||
}
|
||||
|
||||
maven {
|
||||
url = uri('https://repo.maven.apache.org/maven2/')
|
||||
}
|
||||
|
||||
maven {
|
||||
url = uri("https://jitpack.io")
|
||||
}
|
||||
|
||||
maven {
|
||||
url = uri('https://maven.maxhenkel.de/repository/public')
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.github.steveice10:mcprotocollib:1.20.2-1-SNAPSHOT'
|
||||
implementation 'net.kyori:adventure-text-serializer-ansi:4.14.0'
|
||||
implementation 'com.google.code.gson:gson:2.10.1'
|
||||
implementation 'com.google.guava:guava:31.1-jre'
|
||||
implementation 'org.jline:jline:3.23.0'
|
||||
implementation 'org.yaml:snakeyaml:2.0'
|
||||
}
|
||||
|
||||
jar {
|
||||
manifest {
|
||||
attributes 'Main-Class': 'land.chipmunk.parker2991.fnfboyfriendbot.Main'
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
options.encoding = 'UTF-8'
|
||||
}
|
||||
|
||||
tasks.withType(Javadoc).configureEach {
|
||||
options.encoding = 'UTF-8'
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
voiding interger will return a number
|
||||
public static void functionName() {} has the funcion return nothing
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
# This file was generated by the Gradle 'init' task.
|
||||
# https://docs.gradle.org/current/userguide/platforms.html#sub::toml-dependencies-format
|
||||
Binary file not shown.
@@ -0,0 +1,7 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
+249
@@ -0,0 +1,249 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
|
||||
# This is normally unused
|
||||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
if ! command -v java >/dev/null 2>&1
|
||||
then
|
||||
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
|
||||
# shellcheck disable=SC2039,SC3045
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Collect all arguments for the java command:
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
|
||||
# and any embedded shellness will be escaped.
|
||||
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
|
||||
# treated as '${Hostname}' itself on the command line.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Stop when "xargs" is not available.
|
||||
if ! command -v xargs >/dev/null 2>&1
|
||||
then
|
||||
die "xargs is not available"
|
||||
fi
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
Vendored
+92
@@ -0,0 +1,92 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%"=="" set DIRNAME=.
|
||||
@rem This is normally unused
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if %ERRORLEVEL% equ 0 goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if %ERRORLEVEL% equ 0 goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
set EXIT_CODE=%ERRORLEVEL%
|
||||
if %EXIT_CODE% equ 0 set EXIT_CODE=1
|
||||
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
|
||||
exit /b %EXIT_CODE%
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
* This file was generated by the Gradle 'init' task.
|
||||
*
|
||||
* The settings file is used to specify which projects to include in your build.
|
||||
* For more detailed information on multi-project builds, please refer to https://docs.gradle.org/8.5/userguide/building_swift_projects.html in the Gradle documentation.
|
||||
*/
|
||||
|
||||
rootProject.name = 'fnfboyfriendbot'
|
||||
@@ -0,0 +1,47 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot;
|
||||
|
||||
import land.chipmunk.parker2991.fnfboyfriendbot.*;
|
||||
import com.github.steveice10.mc.auth.data.GameProfile;
|
||||
import com.github.steveice10.mc.protocol.MinecraftProtocol;
|
||||
import com.github.steveice10.mc.protocol.data.game.entity.player.HandPreference;
|
||||
import com.github.steveice10.mc.protocol.data.game.setting.ChatVisibility;
|
||||
import com.github.steveice10.mc.protocol.data.game.setting.SkinPart;
|
||||
import com.github.steveice10.mc.protocol.packet.common.serverbound.ServerboundClientInformationPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.ingame.clientbound.ClientboundLoginPacket;
|
||||
import com.github.steveice10.mc.protocol.packet.login.clientbound.ClientboundGameProfilePacket;
|
||||
import com.github.steveice10.packetlib.Session;
|
||||
import com.github.steveice10.packetlib.event.session.*;
|
||||
import com.github.steveice10.packetlib.packet.Packet;
|
||||
import com.github.steveice10.packetlib.tcp.TcpClientSession;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.ScheduledExecutorService;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
public class Bot {
|
||||
private final ArrayList<ClientListener> listeners = new ArrayList<>();
|
||||
|
||||
public final String host;
|
||||
|
||||
public final int port;
|
||||
|
||||
public final List<Bot> bots;
|
||||
|
||||
public final Options.bots options;
|
||||
|
||||
public Bot (Options.bots options, List<Bot> bots) {
|
||||
this.host = options.host;
|
||||
this.port = options.port;
|
||||
this.options = options;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
}
|
||||
public class ClientListener {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.Paths;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import org.yaml.snakeyaml.Yaml;
|
||||
import com.google.common.util.concurrent.ThreadFactoryBuilder;
|
||||
import java.io.*;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
Bot config = null;
|
||||
Path configPath = Paths.get("config.yml");
|
||||
try {
|
||||
Yaml yaml = new Yaml();
|
||||
config = yaml.load(Files.readString(configPath));
|
||||
System.out.println(config);
|
||||
} catch (IOException e) {
|
||||
System.out.println(e.toString());
|
||||
}
|
||||
List<Bots> bots = new ArrayList<>();
|
||||
for (Options options : config.bots) {
|
||||
final Bot client = new Bot(options, bots);
|
||||
bots.add(client);
|
||||
}
|
||||
}
|
||||
|
||||
private static class Options {
|
||||
|
||||
}
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot;
|
||||
|
||||
public class Options {
|
||||
public static class bots {
|
||||
public String host = "127.0.0.1";
|
||||
public int port = 25565;
|
||||
public long reconnectDelay;
|
||||
}
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot.commands;
|
||||
|
||||
|
||||
public class SayCommand {
|
||||
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
|
||||
|
||||
|
||||
public class BruhifyModule {
|
||||
|
||||
|
||||
}
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
|
||||
|
||||
|
||||
public class ChatCommandHandlerModule {
|
||||
|
||||
|
||||
}
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
|
||||
|
||||
|
||||
public class ChatModule {
|
||||
|
||||
|
||||
}
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
|
||||
|
||||
|
||||
public class CommandCoreModule {
|
||||
|
||||
|
||||
}
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
|
||||
|
||||
|
||||
public class CommandLoopManagerModule {
|
||||
|
||||
|
||||
}
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
|
||||
|
||||
|
||||
public class CommandManagerModule {
|
||||
|
||||
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
|
||||
|
||||
|
||||
public class ConsoleModule {
|
||||
|
||||
|
||||
}
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
|
||||
|
||||
|
||||
public class DiscordModule {
|
||||
|
||||
|
||||
}
|
||||
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
|
||||
|
||||
|
||||
public class PlayerListModule {
|
||||
|
||||
|
||||
}
|
||||
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
|
||||
|
||||
|
||||
public class SelfcareModule {
|
||||
|
||||
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot.modules;
|
||||
|
||||
|
||||
public class ValidationModule {
|
||||
|
||||
|
||||
}
|
||||
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot;
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
public class servershit {
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
InetAddress inetAddress = InetAddress.getLocalHost();
|
||||
System.out.println("Hostname \u203a " + inetAddress.getHostName());
|
||||
} catch (UnknownHostException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
System.out.println("Working Directory \u203a " + System.getProperty("user.dir"));
|
||||
System.out.println(System.getProperty("os.arch"));
|
||||
System.out.println("OS \u203a " + System.getProperty("os.name"));
|
||||
System.out.println("OS Version/distro \u203a " + System.getProperty("os.version"));
|
||||
System.out.println("Kernel Version \u203a " + System.getProperty("os.kernel.version"));
|
||||
System.out.println("Cores \u203a " + Runtime.getRuntime().availableProcessors());
|
||||
System.out.println("CPU \u203a " + System.getProperty("sun.cpu.isalist"));
|
||||
System.out.println("Server Free memory " + (Runtime.getRuntime().freeMemory() / 1048576) + " MiB " +
|
||||
Runtime.getRuntime().totalMemory() / 1048576 + " MiB");
|
||||
System.out.println("Device uptime \u203a " + formatUptime(System.currentTimeMillis() / 1000L));
|
||||
System.out.println("Java version \u203a " + System.getProperty("java.version"));
|
||||
}
|
||||
|
||||
private static String formatUptime(long uptime) {
|
||||
long days = uptime / 86400;
|
||||
long hours = (uptime % 86400) / 3600;
|
||||
long minutes = ((uptime % 86400) % 3600) / 60;
|
||||
long seconds = ((uptime % 86400) % 3600) % 60;
|
||||
|
||||
return days + "d " + hours + "h " + minutes + "m " + seconds + "s";
|
||||
}
|
||||
}
|
||||
+27
@@ -0,0 +1,27 @@
|
||||
package land.chipmunk.parker2991.fnfboyfriendbot;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class serverterminal {
|
||||
public static void main(String[] args) {
|
||||
try {
|
||||
ProcessBuilder processBuilder = new ProcessBuilder(Arrays.asList("ash", "-c", "ls"));
|
||||
Process process = processBuilder.start();
|
||||
|
||||
InputStream inputStream = process.getInputStream();
|
||||
byte[] buffer = new byte[1024];
|
||||
int bytesRead;
|
||||
while ((bytesRead = inputStream.read(buffer)) != -1) {
|
||||
System.out.println(new String(buffer, 0, bytesRead));
|
||||
}
|
||||
|
||||
int exitCode = process.waitFor();
|
||||
System.out.println("Child process close all stdio with code " + exitCode);
|
||||
} catch (IOException | InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
Commands:
|
||||
prefixes:
|
||||
- "~"
|
||||
- "fnfbfbot "
|
||||
- "&"
|
||||
- "\ufffc"
|
||||
- "\u202e"
|
||||
- "\u2588"
|
||||
@@ -0,0 +1,7 @@
|
||||
const mc = require('minecraft-protocol');
|
||||
async function ping() {
|
||||
const server = await mc.ping({host:"kaboom.pw",port:"25565"})
|
||||
// console.log(await mc.ping({host:"kaboom.pw",port:"25565"}))
|
||||
console.log(server)
|
||||
}
|
||||
ping()
|
||||
@@ -0,0 +1,10 @@
|
||||
const version = require('./version.json');
|
||||
const ChatMessage = require('prismarine-chat')('1.20.2');
|
||||
console.log(version);
|
||||
console.log(version.BotBuildstring.build);
|
||||
console.log(version.BotBuildstring.codename);
|
||||
console.log(version.BotBuildstring.version);
|
||||
console.log(ChatMessage.fromNotch(`${version.BotBuildstring.version}-${version.BotBuildstring.codename}-${version.BotBuildstring.build}`)?.toAnsi())
|
||||
console.log(ChatMessage.fromNotch(version.BotBuildstring.codename)?.toAnsi())
|
||||
console.log(ChatMessage.fromNotch(version.BotBuildstring.name)?.toAnsi())
|
||||
console.log(`${ChatMessage.fromNotch(version.BotBuildstring.name)?.toAnsi()}-${version.BotBuildstring.version}-${ChatMessage.fromNotch(version.BotBuildstring.codename)?.toAnsi()}`)
|
||||
@@ -0,0 +1,35 @@
|
||||
{
|
||||
"BotBuildstring": {
|
||||
"name": [
|
||||
{
|
||||
"translate":"%s%s%s",
|
||||
"with": [
|
||||
{
|
||||
"text": "FridayNightFunkin",
|
||||
"color": "dark_purple"
|
||||
},
|
||||
{
|
||||
"text": "Boyfriend",
|
||||
"color": "#00FFFF"
|
||||
},
|
||||
{
|
||||
"text": "Bot",
|
||||
"color": "#ff0000"
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"build":"#500",
|
||||
"codename": [
|
||||
{
|
||||
"text": "Censory ",
|
||||
"color": "dark_red"
|
||||
},
|
||||
{
|
||||
"text": "Overload",
|
||||
"color": "red"
|
||||
}
|
||||
],
|
||||
"version":"v5.0.8"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
const crypto = require('crypto');
|
||||
const sus = 'meow';
|
||||
//const amogus = crypto.createHash('sha256').update(Math.floor(Date.now() / 10000) + bot.validation.keys.trustedKey).digest('hex').substring(0, 16)
|
||||
const amogus = crypto.createHash('sha256').update(sus).digest('hex')
|
||||
console.log(amogus)
|
||||
|
||||
+70
-70
@@ -1,98 +1,98 @@
|
||||
const mc = require("minecraft-protocol");
|
||||
const { EventEmitter } = require("node:events");
|
||||
const fs = require("fs");
|
||||
const path = require("path");
|
||||
const util = require("node:util");
|
||||
|
||||
const usernameGen = require('./util/usernameGen');
|
||||
require("events").EventEmitter.defaultMaxListeners = Infinity;
|
||||
const ChatMessage = require('prismarine-chat')('1.20.2')
|
||||
function createBot(options = {}) {
|
||||
const { execSync } = require('child_process');
|
||||
function createBot(options = {}, config) {
|
||||
const bot = new EventEmitter();
|
||||
// const rs = require("randomstring");
|
||||
// Set some default values in options
|
||||
bot.options = {
|
||||
host: options.host ??= "localhost",
|
||||
username: options.username ??= "FNFBoyfriendBot",
|
||||
hideErrors: options.hideErrors ??= true, // HACK: Hide errors by default as a lazy fix to console being spammed with the console
|
||||
version: options.version ??= '1.20.2',
|
||||
|
||||
},
|
||||
|
||||
bot.options = {
|
||||
host: options.host ??= "localhost",
|
||||
username: options.username ??= usernameGen(),
|
||||
hideErrors: options.hideErrors ??= true, // HACK: Hide errors by default as a lazy fix to console being spammed with the console
|
||||
version: options.version ??= '1.20.2',
|
||||
}
|
||||
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);
|
||||
try{
|
||||
bot.emit('packet.' + meta.name, data)
|
||||
} catch(e) {
|
||||
if(e.toString() === 'RangeError: Invalid string length'){
|
||||
bot._client.chat('Leaving to prevent crashing')
|
||||
bot._client.end()
|
||||
} else {
|
||||
console.log(e)
|
||||
}
|
||||
bot.emit('packet.' + meta.name, data)
|
||||
});
|
||||
/* const timer = setInterval(() => {
|
||||
if (!config.bots.endcredits) {
|
||||
return
|
||||
} else {
|
||||
bot.chat(`Join the FNFBoyfriendBot discord ${bot.discord.invite}`)
|
||||
}
|
||||
});
|
||||
const timer = setInterval(() => {
|
||||
if(!bot.options.endcredits){
|
||||
return
|
||||
}else{
|
||||
bot.chat(`Join the FNFBoyfriendBot discord ${bot.options.discord.invite}`)
|
||||
}
|
||||
}, 280000)
|
||||
|
||||
client.on("login", async function (data) {
|
||||
}, 280000)*/
|
||||
client.on("login", async function (data) {
|
||||
bot.uuid = client.uuid;
|
||||
bot.username = client.username;
|
||||
bot.port = bot.options.port;
|
||||
bot.version = bot.options.version;
|
||||
if (bot.options.isCreayun) {
|
||||
bot.command('server creative')
|
||||
}
|
||||
try {
|
||||
var day = new Date().getDay()
|
||||
if (day === 5) {
|
||||
bot.sendFeedback({text:"Gettin' freaky on a Friday Night!"})
|
||||
} else {
|
||||
bot.sendFeedback({text:`${process.env.buildstring}`})
|
||||
}
|
||||
}catch(e){
|
||||
}
|
||||
timer
|
||||
})
|
||||
bot.version = bot.options.version;
|
||||
/* if (bot.options.isCreayun) {
|
||||
}
|
||||
var day = new Date().getDay()
|
||||
if (day === 5) {
|
||||
bot.chat("Gettin' freaky on a Friday Night!")
|
||||
} else {
|
||||
bot.chat(`&5FNF&bBoyfriend&4Bot &f- &4Parker&02991`)
|
||||
}
|
||||
timer;
|
||||
if (bot.options.useChat) {
|
||||
bot?.console?.warn(`useChat is active for ${bot.options.host} the bot will not be able to run commands in core`)
|
||||
} else if (bot.options.isCreayun) {
|
||||
bot?.console?.info(`Creayun mode is active for ${bot.options.host} please not that the bot will not read kaboom commands and messages when Creayun
|
||||
mode is active`)
|
||||
}
|
||||
if (bot.options.debug.enabled) {
|
||||
bot.console.warn(`Debug mode is enabled for ${bot.options.host}:${bot.options.port} please note this WILL spam console is all options are enabled`)
|
||||
}*/
|
||||
})
|
||||
client.on("end", (reason) => {
|
||||
bot.emit("end", reason);
|
||||
bot.console.warn(`Disconnected: ${reason.toString()}`);
|
||||
bot.cloop.clear()
|
||||
bot.memusage.off()
|
||||
bot.tps.off()
|
||||
bot.bruhifyText = ''
|
||||
clearInterval(timer)
|
||||
bot?.discord?.channel?.send('``Disconnected:' + reason.toString() + '``' )
|
||||
|
||||
});
|
||||
|
||||
client.on("disconnect", (reason) => {
|
||||
bot.emit("disconnect", reason);
|
||||
bot.console.warn(`Disconnected: ${reason.toString()}`);
|
||||
bot?.discord?.channel?.send('``Disconnected:' + reason.toString() + '``' )
|
||||
const parsed = JSON.stringify(reason);
|
||||
bot.emit('end', parsed);
|
||||
bot.console.warn(`Disconnected: ${parsed}`);
|
||||
bot.cloop.clear()
|
||||
bot.memusage.off()
|
||||
bot.tps.off()
|
||||
bot.bruhifyText = ''
|
||||
// clearInterval(timer)
|
||||
bot?.discord?.channel?.send('Disconnected: ' + '``' + parsed + '``')
|
||||
});
|
||||
|
||||
client.on("disconnect", (data) => {
|
||||
const parsed = JSON.parse(data.reason)
|
||||
bot.emit(parsed, "disconnect");
|
||||
if (parsed === 'Server is full!') {
|
||||
bot.emit("disconnect", `what the fuck?`)
|
||||
} else if (parsed === 'Wait 5 seconds before connecting, thanks! :)') {
|
||||
bot.options.reconnectDelay = 1000 * 5
|
||||
bot.console.info(`Setting reconnect delay to ${1000 * 5}`)
|
||||
bot.discord.channel?.send(`Setting reconnecting delay to ${1000 * 5}`)
|
||||
} else {
|
||||
bot.console.warn(`Disconnected: ${JSON.stringify(parsed)}`);
|
||||
bot?.discord?.channel?.send('Disconnected: ' + '``' + JSON.stringify(parsed) + '``')
|
||||
}
|
||||
});
|
||||
|
||||
client.on("kick_disconnect", (reason) => {
|
||||
bot.emit("kick_disconnect", reason);
|
||||
bot.console.warn(`Disconnected: ${reason.toString()}`);
|
||||
bot?.discord?.channel?.send('``Disconnected:' + reason.toString() + '``')
|
||||
client.on("kick_disconnect", (data) => {
|
||||
const parsed = JSON.parse(data.reason);
|
||||
bot.emit(parsed, "kick_disconnect");
|
||||
bot?.discord?.channel?.send('Disconnected: ' + '``' + parsed + '``')
|
||||
bot.console.warn(`Disconnected: ${JSON.stringify(data.reason)}`);
|
||||
});
|
||||
|
||||
client.on("keep_alive", ({ keepAliveId }) => {
|
||||
bot.emit("keep_alive", { keepAliveId });
|
||||
});
|
||||
|
||||
client.on("error", (error) => {
|
||||
bot?.discord?.channel?.send('``' + error.toString() + '``' )
|
||||
bot.emit("error", error)
|
||||
bot?.discord?.channel?.send('Disconnected: ' + '``' + JSON.stringify(error.toString()) + '``')
|
||||
bot.console.warn(error.toString())
|
||||
// bot.emit("error", error)
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
function chipmunkmod (message, data, context, bot) {
|
||||
try{
|
||||
try {
|
||||
if (message === null || typeof message !== 'object') return
|
||||
|
||||
if (message.with?.length < 3 || (message.translate !== '[%s] %s › %s' && message.translate !== '%s %s › %s')) return
|
||||
@@ -28,8 +28,8 @@ function chipmunkmod (message, data, context, bot) {
|
||||
if (!sender) return null
|
||||
|
||||
return { sender, contents, type: 'minecraft:chat', senderComponent }
|
||||
}catch(e){
|
||||
console.error(e)
|
||||
} catch(e) {
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
}
|
||||
module.exports = chipmunkmod
|
||||
module.exports = chipmunkmod
|
||||
+35
-26
@@ -1,33 +1,42 @@
|
||||
function creayun (messageobj, data) { // this function is not getting called
|
||||
const ChatMessage = require('prismarine-chat')('1.20.1')
|
||||
const ChatMessage = require('prismarine-chat')('1.20.1')
|
||||
const util = require('util')
|
||||
const stringify = message => new ChatMessage(message).toString()
|
||||
const message = stringify(messageobj);
|
||||
var pattern = /^(.*?) (\S*?) » (.*?)$/;
|
||||
// var pattern = /^(.*?) (\S*?) \u203a (.*?)$/;
|
||||
const playerWithPrefix = /^(.*?) (\S*?) » (.*?)$/;
|
||||
const playerWithoutPrefix = /^(\S*?) » (.*?)$/
|
||||
// var pattern = /^(.*?) (\S*?) \u203a (.*?)$/;
|
||||
//console.log('[debug] parsing a message');
|
||||
const match = message.match(pattern);
|
||||
if(pattern.test(message)) {
|
||||
// const match = message.match(pattern);
|
||||
if (playerWithPrefix.test(message)) {
|
||||
// console.log('[debug]', match);
|
||||
return { sender: match[2], contents: match[3], type: 'minecraft:chat'}; //
|
||||
} else {
|
||||
//console.log('[debug] pattern does not match');
|
||||
let match = message.match(playerWithPrefix)
|
||||
const sender = data.players.find((player) => player.uuid === player.uuid)
|
||||
if (!sender) return undefined
|
||||
return { sender, contents: match[3], type: 'minecraft:chat'};
|
||||
}//i just realized that the bot uses tellraw
|
||||
//ima try to fix that
|
||||
}//it picks players up as undefined in creayun
|
||||
//and i tried using the kaboom chat parser but edited and that didnt work
|
||||
// [] username »
|
||||
module.exports = creayun//:troll:
|
||||
// •••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
|
||||
// function(function(function(function(function(function(function(function(function(function(function(function(function(function(function(function)))))))))))))))
|
||||
// i guess so because it connects you
|
||||
// i think?
|
||||
//🐔💨💩😎🐒🥶😁😂⏰❌🐒🛏
|
||||
//very real
|
||||
// theres so much things that get logged :sob:
|
||||
//gotta love when it refuses to connect
|
||||
// someones trying to be fake me in kaboom
|
||||
//the bot is being waaay to sus
|
||||
// i will crash him when i get on // sus // very
|
||||
//k
|
||||
// getting the fake parker out of kaboom
|
||||
// pcrashed
|
||||
}
|
||||
module.exports = creayun;
|
||||
// bot.players.find((player) => player.profile.name === players.username)
|
||||
// let displayName = data.senderName ?? { text: '' }
|
||||
/*
|
||||
const playerListDisplayName = { extra: [prefix, displayName], text: '' }
|
||||
let sender
|
||||
if (data.uuid) {
|
||||
sender = data.players.find(player => player.uuid === data.senderUuid)
|
||||
} else {
|
||||
const playerListDisplayName = { extra: [prefix, displayName], text: '' }
|
||||
sender = data.players.find(player => util.isDeepStrictEqual(player.displayName, playerListDisplayName))
|
||||
}
|
||||
|
||||
if (!sender) return undefined
|
||||
|
||||
return { sender, contents, type: 'minecraft:chat', displayName }
|
||||
}
|
||||
|
||||
function isSeparatorAt (children, start) {
|
||||
return (children[start]?.text === ':' || children[start]?.text === '\xa7r:') && children[start + 1]?.text === ' '
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ function kaboom (message, data) {
|
||||
}
|
||||
|
||||
function isSeparatorAt (children, start) {
|
||||
return (children[start]?.text === ':' || children[start]?.text === '\xa7f:') && children[start + 1]?.text === ' '
|
||||
return (children[start]?.text === ':' || children[start]?.text === '\xa7r:') && children[start + 1]?.text === ' '
|
||||
}
|
||||
|
||||
module.exports = kaboom
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
const util = require('util')
|
||||
|
||||
function savage (message, data) {
|
||||
if (message === null || typeof message !== 'object') return
|
||||
|
||||
if (message.text !== '' || !Array.isArray(message.extra) || message.extra.length < 3) return
|
||||
|
||||
const children = message.extra
|
||||
|
||||
const prefix = children[0]
|
||||
let displayName = data.senderName ?? { text: '' }
|
||||
let contents = { text: ' ' }
|
||||
|
||||
if (isSeparatorAt(children, 1)) { // Missing/blank display name
|
||||
if (children.length > 3) contents = children[3]
|
||||
} else if (isSeparatorAt(children, 2)) {
|
||||
displayName = children[1]
|
||||
if (children.length > 4) contents = children[4]
|
||||
} else {
|
||||
return undefined
|
||||
}
|
||||
/*
|
||||
if (isSeparatorAt(children, 1)) { // Missing/blank display name
|
||||
if (children.length > 3) contents = children[3]
|
||||
} else if (isSeparatorAt(children, 2)) {
|
||||
displayName = children[1]
|
||||
if (children.length > 4) contents = children[4]
|
||||
} else {
|
||||
return undefined
|
||||
}
|
||||
*/
|
||||
// let sus = { text: ' ' }
|
||||
const playerListDisplayName = { extra: [prefix, displayName, content]}
|
||||
let sender
|
||||
if (data.uuid) {
|
||||
sender = data.players.find(player => player.uuid === data.senderUuid)
|
||||
} else {
|
||||
const playerListDisplayName = { extra: [prefix, displayName, content] }
|
||||
sender = data.players.find(player => util.isDeepStrictEqual(player.displayName, playerListDisplayName))
|
||||
}
|
||||
|
||||
if (!sender) return undefined
|
||||
|
||||
return { sender, contents, type: 'minecraft:chat' }
|
||||
}
|
||||
|
||||
function isSeparatorAt (children, start) {
|
||||
return (children[start]?.text === '»' || children[start]?.text === '\xa79»\xa7r') && children[start + 1]?.text === ''
|
||||
}
|
||||
// [prefix]&r [name] [suffix] &9»&r
|
||||
// {DISPLAYNAME} &9»&r {MESSAGE}
|
||||
/*
|
||||
{"extra":[{"text":"e e"},{"text":" "},{"color":"dark_red","text":"Parker"},{"color":"black","text":"2991"},{"text":" "},
|
||||
{"color":"blue","text":"»"},{"text":" "},{"color":"white","text":"duping fucking rank"}],"text":""}
|
||||
*/
|
||||
/*
|
||||
{"extra":[{"bold":true,"color":"dark_red","text":"["},{"bold":true,"color":"red","text":"OP"},{"bold":true,"color":"dark_red","text":"]"},
|
||||
{"text":" "},{"color":"red","text":"Parker2991"},{"text":" "},{"color":"blue","text":"»"},{"text":" e"}],"text":""}
|
||||
*/
|
||||
module.exports = savage;
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
function say (message, data, context, bot) {
|
||||
try {
|
||||
if (message === null || typeof message !== 'object') return
|
||||
|
||||
if (message.with?.length < 2 || (message.translate !== 'chat.type.announcement' && message.translate !== '%s %s')) return
|
||||
|
||||
const senderComponent = message.with[0]
|
||||
// wtf spam again -
|
||||
//console.log(senderComponent)//wtf...
|
||||
|
||||
|
||||
const contents = message.with[1]
|
||||
// spam lol - console.log(contents)
|
||||
let sender
|
||||
|
||||
const hoverEvent = senderComponent.hoverEvent
|
||||
//console.log(JSON.stringify(hoverEvent))
|
||||
if (hoverEvent?.action === 'show_entity') {
|
||||
const id = hoverEvent?.contents?.id
|
||||
//
|
||||
sender = data.players.find(player => player.uuid === id)
|
||||
} else {
|
||||
const stringUsername = data.getMessageAsPrismarine(senderComponent).toString() // TypeError: data.getMessageAsPrismarine is not a function
|
||||
|
||||
sender = data.players.find(player => player.profile.name) //=== stringusername)
|
||||
}
|
||||
|
||||
if (!sender) return null
|
||||
|
||||
return { sender, contents, type: 'minecraft:chat', senderComponent }
|
||||
} catch(e) {
|
||||
console.error(e)
|
||||
}
|
||||
}
|
||||
module.exports = say
|
||||
+84
-110
@@ -1,28 +1,54 @@
|
||||
// TODO: Maybe add more authors
|
||||
/*const bots = [
|
||||
const bots = [
|
||||
{
|
||||
name: { text: "HBot", color: "aqua", bold: false },
|
||||
authors: ["hhhzzzsss"],
|
||||
exclaimer: "HBOT HARRYBUTT LMAOOOOOOOOOOOOOOOOO",
|
||||
foundation: "java/mcprotocollib",
|
||||
prefixes: ["#"],
|
||||
maintained:'false',
|
||||
},
|
||||
{
|
||||
name: { text: "SC09", color: "gray", bold: false },
|
||||
authors: ["spyingcreeper09"],
|
||||
exclaimer: "i approve :3",
|
||||
foundation: "NodeJS/node-minecraft-protocol",
|
||||
prefixes: ["@"],
|
||||
maintained:'true',
|
||||
},
|
||||
{
|
||||
name: { text: "FBot", color: "gold", bold: false },
|
||||
authors: ["aaa"],
|
||||
exclaimer: "frog :3",
|
||||
foundation: "NodeJS/Node-minecraft-protocol",
|
||||
{
|
||||
name: [{ text: "FBot", color: "gold" }],
|
||||
authors: ["popbob/aaa"],
|
||||
exclaimer: "",
|
||||
foundation: "nodejs/node-minecraft-protocol",
|
||||
prefixes: ["+"],
|
||||
maintained:'true?',
|
||||
},
|
||||
|
||||
{
|
||||
name: { text: "CddehhBot", color: "red", bold: false },
|
||||
authors: ["CaydennO1","spyingcreeper09"],
|
||||
exclaimer: "WHAT IS THIS GOOFY AAAH FUCKING BOT FUCKING PIECE OF RETARDED ASS SHIT BOT ITS SO FUCKING SHIT I WANNA IPFILTER IT WITH FUCKING CHOMENS",
|
||||
foundation: "nodejs/mineflayer",
|
||||
prefixes: [","],
|
||||
},
|
||||
{
|
||||
name: { text: "TurtleBot", color: "green", bold: false },
|
||||
authors: ["TurtleKid"],
|
||||
exclaimer: "nmp when?",
|
||||
foundation: "nodejs/mineflayer",
|
||||
prefixes: ["\\"],
|
||||
},
|
||||
{
|
||||
name: { text: "NothingBot", color: "dark_red", bold: false },
|
||||
authors: ["Yaode_owo"],
|
||||
exclaimer: "uwu",
|
||||
foundation: "nodejs/mineflayer",
|
||||
prefixes: ["?"],
|
||||
},
|
||||
{
|
||||
name: { text: "SC09Bot", color: "dark_gray", bold: false },
|
||||
authors: ["spyingcreeper09"],
|
||||
exclaimer: ":3",
|
||||
foundation: "nodejs/node-minecraft-protocol",
|
||||
prefixes: ["@"],
|
||||
},
|
||||
{
|
||||
name: { text: "HorizonBot", color: "gold", bold: false },
|
||||
authors: ["ZenZoya","Yaode_owo","Parker2991", "and others"],
|
||||
exclaimer: "originally called §5FleamBot§r",
|
||||
foundation: "nodejs/node-minecraft-protocol",
|
||||
prefixes: ["^"],
|
||||
},
|
||||
{
|
||||
name: { text: "64Bot", color: "gold", bold: false },
|
||||
@@ -30,7 +56,6 @@
|
||||
exclaimer: "NINTENDO 64?!?!??!?! 69Bot when??????",
|
||||
foundation: "NodeJS/Mineflayer",
|
||||
prefixes: ["w="],
|
||||
maintained:'false',
|
||||
},
|
||||
{
|
||||
name: { text: "Nebulabot", color: "dark_purple", bold: false },
|
||||
@@ -38,7 +63,6 @@
|
||||
exclaimer: "the void",
|
||||
foundation: "NodeJS/Node-minecraft-protocol",
|
||||
prefixes: ["["],
|
||||
maintained:'false',
|
||||
},
|
||||
{
|
||||
name: [
|
||||
@@ -49,8 +73,6 @@
|
||||
exclaimer: "prismarine :3",
|
||||
foundation: "NodeJS/Node-minecraft-protocol",
|
||||
prefixes: ["["],
|
||||
maintained:'true',
|
||||
|
||||
},
|
||||
{
|
||||
name: { text: "SharpBot", color: "aqua", bold: false },
|
||||
@@ -59,7 +81,6 @@
|
||||
"sharp as in the tv? idfk im out of jokes also the first c# bot on the list??",
|
||||
foundation: "C#/MineSharp",
|
||||
prefixes: ["s="],
|
||||
maintained:'false',
|
||||
},
|
||||
|
||||
{
|
||||
@@ -68,7 +89,6 @@
|
||||
exclaimer: "stop mooning/mooing me ",
|
||||
foundation: "NodeJS/Mineflayer",
|
||||
prefixes: ["m="],
|
||||
maintained:'false',
|
||||
},
|
||||
{
|
||||
name: { text: "TableBot", color: "yellow", bold: false },
|
||||
@@ -76,7 +96,6 @@
|
||||
exclaimer: "TABLE CLOTH BOT?!?! ",
|
||||
foundation: "NodeJS/Node-minecraft-protocol",
|
||||
prefixes: ["t!"],
|
||||
maintained:'false?',
|
||||
},
|
||||
{
|
||||
name: [
|
||||
@@ -87,21 +106,18 @@
|
||||
exclaimer: "",
|
||||
foundation: "Java/Custom",
|
||||
prefixes: ["!"],
|
||||
maintained:'false?',
|
||||
},
|
||||
{
|
||||
name: { text: "SBot Java", color: "white", bold: false }, // TODO: Gradient
|
||||
authors: ["evkc"],
|
||||
foundation: "Java/MCProtocolLib",
|
||||
prefixes: [":"],
|
||||
maintained:'true',
|
||||
},
|
||||
{
|
||||
name: { text: "SBot Rust", color: "white", bold: false }, // TODO: Gradient
|
||||
authors: ["evkc"],
|
||||
foundation: "Rust",
|
||||
prefixes: ["re:"],
|
||||
maintained:':shrug:',
|
||||
},
|
||||
{
|
||||
name: { text: "Z-Boy-Bot", color: "dark_purple", bold: false }, // TODO: Gradient
|
||||
@@ -109,7 +125,6 @@
|
||||
authors: ["Romnci"],
|
||||
foundation: "NodeJS/mineflayer or Java/mcprotocollib idfk",
|
||||
prefixes: ["Z]"],
|
||||
maintained:'false',
|
||||
},
|
||||
{
|
||||
name: { text: "ABot", color: "gold", bold: true }, // TODO: Gradient
|
||||
@@ -117,7 +132,6 @@
|
||||
authors: [{ text: "_yfd", color: "light_purple" }],
|
||||
foundation: "NodeJS/Node-Minecraft-Protocol",
|
||||
prefixes: ["<"],
|
||||
maintained:'false',
|
||||
},
|
||||
{
|
||||
name: { text: "ABot-V2", color: "gold", bold: true }, // TODO: Gradient
|
||||
@@ -125,7 +139,6 @@
|
||||
authors: [{ text: "_yfd", color: "light_purple" }],
|
||||
foundation: "NodeJS/Node-Minecraft-Protocol",
|
||||
prefixes: ["<"],
|
||||
maintained:'false',
|
||||
},
|
||||
{
|
||||
name: { text: "FardBot", color: "light_purple", bold: false },
|
||||
@@ -133,7 +146,6 @@
|
||||
exclaimer: "bot is dead lol",
|
||||
foundation: "NodeJS/Mineflayer",
|
||||
prefixes: ["<"],
|
||||
maintained:'false',
|
||||
},
|
||||
|
||||
{
|
||||
@@ -144,20 +156,17 @@
|
||||
|
||||
foundation: "Java/MCProtocolLib",
|
||||
prefixes: ["'", "/'"],
|
||||
maintained:'false',
|
||||
},
|
||||
{
|
||||
name: { text: "ChipmunkBot NodeJS", color: "green", bold: false },
|
||||
authors: ["_ChipMC_"],
|
||||
foundation: "NodeJS/Node-Minecraft-Protocol",
|
||||
maintained:'true',
|
||||
},
|
||||
},
|
||||
{
|
||||
name: { text: "TestBot", color: "aqua", bold: false },
|
||||
authors: ["Blackilykat"],
|
||||
foundation: "Java/MCProtocolLib",
|
||||
prefixes: ["-"],
|
||||
maintained:'false',
|
||||
},
|
||||
{
|
||||
name: { text: "UBot", color: "grey", bold: false },
|
||||
@@ -166,15 +175,13 @@
|
||||
|
||||
foundation: "NodeJS/node-minecraft-protocol",
|
||||
prefixes: ['"'],
|
||||
maintained:'false',
|
||||
},
|
||||
{
|
||||
name: { text: "ChomeNS Bot Java", color: "yellow", bold: false },
|
||||
authors: ["chayapak"],
|
||||
exclaimer: "wow its my bot !! ! 4374621q43567%^&#%67868-- chayapak",
|
||||
exclaimer: "wow its my bot !! ! 4374621q43567%^&#%67868-- chayapak \n rip ChomeNS bot i wonder what chayapak is currently doing -- Parker2991",
|
||||
foundation: "Java/MCProtocolLib",
|
||||
prefixes: ["*", "cbot ", "/cbot "],
|
||||
maintained:'false',
|
||||
},
|
||||
{
|
||||
name: { text: "ChomeNS Bot NodeJS", color: "yellow", bold: false },
|
||||
@@ -182,7 +189,6 @@
|
||||
|
||||
foundation: "NodeJS/Node-Minecraft-Protocol",
|
||||
prefixes: ["*", "cbot", "/cbot"],
|
||||
maintained:'false',
|
||||
},
|
||||
{
|
||||
name: { text: "RecycleBot", color: "dark_green", bold: false },
|
||||
@@ -190,7 +196,6 @@
|
||||
exclaimer: "nice bot",
|
||||
language: "NodeJS/node-minecraft-protocol",
|
||||
prefixes: ["="],
|
||||
maintained:'true',
|
||||
},
|
||||
{
|
||||
name: { text: "neobot", color: "blue", bold: false },
|
||||
@@ -198,7 +203,6 @@
|
||||
authors: ["mirkokral"],
|
||||
foundation: "java/MCProtocolLib",
|
||||
prefixes: ["_"],
|
||||
maintained:'false',
|
||||
},
|
||||
{
|
||||
name: { text: "ManBot", color: "dark_green", bold: false },
|
||||
@@ -207,7 +211,6 @@
|
||||
authors: ["Man/LogintimedOut"],
|
||||
foundation: "NodeJS/mineflayer",
|
||||
prefixes: ["(Note:I dont remember!!)"],
|
||||
maintained:'false',
|
||||
},
|
||||
{
|
||||
name: [
|
||||
@@ -218,34 +221,30 @@
|
||||
authors: ["IuCC"],
|
||||
foundation: "NodeJS/node-minecraft-protocol",
|
||||
prefixes: ["["],
|
||||
maintained:'false',
|
||||
},
|
||||
{
|
||||
name: [
|
||||
{ text: "Blurry", color: "dark_purple", bold: false },
|
||||
{ text: "Bot", color: "red" },
|
||||
],
|
||||
exclaimer: "§4§kfuck you",
|
||||
exclaimer: "KILL YOURSELF BIIIIIIIIIIIIIIIIIITCCCCCCCCCCCCH;lksadjklaklsjjk;lavsklja;kjlvkjladv;kjavdjkavjk;lvdkj;lsajvk;ds",
|
||||
authors: ["SirLennox"],
|
||||
foundation: "???",
|
||||
foundation: "Java/custom",
|
||||
prefixes: [","],
|
||||
maintained:'false',
|
||||
},
|
||||
{
|
||||
name: [{ text: "SnifferBot", color: "gold", bold: false }],
|
||||
exclaimer: "sniff sniff FNFBoyfriendBot simp",
|
||||
authors: ["popbob"],
|
||||
authors: ["popbob/aaa"],
|
||||
foundation: "NodeJS/Node-minecraft-protocol",
|
||||
prefixes: [">"],
|
||||
maintained:'false',
|
||||
},
|
||||
{
|
||||
name: [{ text: "XBot", color: "dark_purple", bold: false }],
|
||||
exclaimer: "",
|
||||
authors: ["popbob"],
|
||||
authors: ["popbob/aaa"],
|
||||
foundation: "ts-Node/Node-minecraft-protocol",
|
||||
prefixes: ["$"],
|
||||
maintained:':shrug:',
|
||||
},
|
||||
{
|
||||
name: [
|
||||
@@ -256,7 +255,6 @@
|
||||
authors: ["ginlang , G6_, ArrayBuffer, and i guess more??"],
|
||||
foundation: "NodeJS/node-minecraft-protocol",
|
||||
prefixes: ["^"],
|
||||
maintained:'false',
|
||||
},
|
||||
|
||||
{
|
||||
@@ -271,12 +269,13 @@
|
||||
{ text: " _ChipMC_", color: "dark_green", bold: false },
|
||||
{ text: " chayapak", color: "yellow", bold: false },
|
||||
{ text: " _yfd", color: "light_purple", bold: false },
|
||||
{ text: "popbob", color: "gold" },
|
||||
{ text: "popbob/aaa", color: "gold" },
|
||||
{ text: "MorganAnkan", color: "dark_green" },
|
||||
{ text: "TurtleKid", color: "green" },
|
||||
],
|
||||
exclaimer: "FNFBoyfriendBot NMP Rewrite",
|
||||
exclaimer: "v4.0x - current",
|
||||
foundation: "NodeJS/node-minecraft-protocol",
|
||||
prefixes: ["~ % &"],
|
||||
maintained:'true',
|
||||
prefixes: [ '~', 'fnfbfbot ', '', '', '█' ],
|
||||
},
|
||||
{
|
||||
name: [
|
||||
@@ -293,61 +292,47 @@
|
||||
"1037 LINES OF CODE WTFARD!??! also this version is in console commands only",
|
||||
foundation: "NodeJS/mineflayer",
|
||||
prefixes: [],
|
||||
maintained:'false',
|
||||
},
|
||||
];
|
||||
*/
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
const CommandError = require('../util/command_error')
|
||||
module.exports = {
|
||||
name: "bots",
|
||||
description: ["shows a list of known bots"],
|
||||
aliases: ["knownbots"],
|
||||
trustLevel: 0,
|
||||
usage:[""],
|
||||
execute(context) {
|
||||
|
||||
//const bots = fs.readdirSync(path.join(__dirname,'../util/bots')).forEach(file => require(`../util/bots/${file}`))
|
||||
//const bots = require(fs.readdirSync(path.join(__dirname,'../util/bots')).forEach(file => (file)))
|
||||
//const bots = require(['../util/bots'].forEach(file => file))
|
||||
const query = context.arguments.join(" ").toLowerCase();
|
||||
usage:[""],
|
||||
async execute(context) {
|
||||
const query = context.arguments.join(" ").toLowerCase();
|
||||
const bot = context.bot;
|
||||
const botsFiles = path.join(__dirname, '../util/bots');
|
||||
//list = [];
|
||||
//for (const file of fs.readdirSync('./util/bots')) {
|
||||
//bots.push(require(path.join(__dirname, '../util/bots', file)))
|
||||
//};
|
||||
//name = Object.values(bots.map(name => name))
|
||||
//auth = Object.values(bots).map(sus => sus.authors)
|
||||
//exclaimer = Object.values(bots).map(sus => sus.exclaimer)
|
||||
//prefixes = Object.values(bots).map(sus => sus.prefixes)
|
||||
//foundation = Object.values(bots).map(sus => sus.foundation)
|
||||
//prefix = Object.values(bots).map(sus => sus.prefixes)
|
||||
// maintained = Object.values(bots).map(sus => sus.maintained)
|
||||
//amongus = Object.values(bots).map(sus => sus)
|
||||
if (query.length === 0) {
|
||||
const list = [];
|
||||
if(!bot.options.Core.enabled){
|
||||
throw new CommandError('Coreless mode is active can not execute command!')
|
||||
}else{
|
||||
//for (const file of fs.readdirSync('./util/bots')) {
|
||||
//bots.push(require(path.join(__dirname, '../util/bots', file)))
|
||||
//};
|
||||
//bots = fs.readdirSync('./util/bots')
|
||||
for (const file of fs.readdirSync('./util/bots')) {
|
||||
list.push(require(path.join(__dirname,'../util/bots',file)))
|
||||
}
|
||||
for (const info of bots) {
|
||||
if (bots.length !== 0) list.push({ text: ", ", color: "gray" }); // list.push(info.name)
|
||||
const list = [];
|
||||
for (const info of bots) {
|
||||
if (list.length !== 0) {
|
||||
list.push({ text: ", ", color: "gray" });
|
||||
}
|
||||
list.push(info.name);
|
||||
|
||||
}
|
||||
bot.tellraw(bots.name)
|
||||
console.log(Object.values(bots).map(name => name))
|
||||
//const ping = Object.values(bot.players).map(player =>player.latency)
|
||||
bot.sendFeedback(bot.getMessageAsPrismarine(["Known bots (", bots.length, ") - ", ...list])?.toMotd().replaceAll('\xa7','\xa7'),false);
|
||||
|
||||
if (bot.options.isCreayun) {
|
||||
let sus
|
||||
// for ( sus instanceOf list)
|
||||
bot.chat(bot.getMessageAsPrismarine(["Known bots (", bots.length, ") - "])?.toMotd().replaceAll('§','&'));
|
||||
await bot.chatDelay(2000)
|
||||
// setTimeout(async function() {
|
||||
// for (const sus of list) {
|
||||
bot.chat(bot.getMessageAsPrismarine(list)?.toString());
|
||||
await bot.chatDelay(2000)
|
||||
// }, 2000)
|
||||
return
|
||||
|
||||
} else {
|
||||
bot.sendFeedback(
|
||||
bot.getMessageAsPrismarine(["Known bots (", bots.length, ") - ", ...list]).toMotd().replaceAll('\xa7','\xa7'),
|
||||
false,
|
||||
);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
for (const info of bots) {
|
||||
const plainName = String(
|
||||
@@ -359,17 +344,8 @@ console.log(Object.values(bots).map(name => name))
|
||||
|
||||
sendBotInfo(info, bot) {
|
||||
const component = [""];
|
||||
//component.push("Name: ", amongus.name);
|
||||
//const name = Object.values(bots.map(name => name.name))
|
||||
//const auth = Object.values(bots).map(sus => sus.authors)
|
||||
//const exclaimer = Object.values(bots).map(sus => sus.exclaimer)
|
||||
//const prefixes = Object.values(bots).map(sus => sus.prefixes)
|
||||
//const foundation = Object.values(bots).map(sus => sus.foundation)
|
||||
//const prefix = Object.values(bots).map(sus => sus.prefixes)
|
||||
//const maintained = Object.values(bots).map(sus => sus.maintained)
|
||||
component.push("Name: ", Object.values(bots).map(name => name.name));
|
||||
console.log(name)
|
||||
if (info.exclaimer) component.push("\n", "Exclaimer: ", info.exclaimer);
|
||||
component.push("Name: ", info.name);
|
||||
if (info.exclaimer) component.push("\n", "Exclaimer: ", info.exclaimer);
|
||||
if (info.authors && info.authors.length !== 0) {
|
||||
component.push("\n", "Authors: ");
|
||||
for (const author of info.authors) {
|
||||
@@ -385,8 +361,6 @@ if (info.exclaimer) component.push("\n", "Exclaimer: ", info.exclaimer);
|
||||
}
|
||||
component.pop();
|
||||
}
|
||||
if(info.maintained) component.push("\n","Maintained: ",info.maintained)
|
||||
|
||||
bot.tellraw([component]);
|
||||
},
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
const CommandError = require('../util/command_error')
|
||||
|
||||
module.exports = {
|
||||
name: 'bruhify',
|
||||
@@ -10,11 +10,13 @@ usage:["smexy text here"],
|
||||
const bot = context.bot
|
||||
const args = context.arguments
|
||||
const message = context.arguments.join(' ')
|
||||
|
||||
if (bot.options.isCreayun) {
|
||||
throw new CommandError('isCreayun is active!')
|
||||
} else {
|
||||
bot.bruhifyText = args.join(' ')
|
||||
|
||||
bot.sendFeedback(JSON.stringify(bot.bruhifyText))
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,6 +70,19 @@ const bots = [
|
||||
foundation: '4/22/24',
|
||||
exclaimer:'a lot of clean up adding shit and more',
|
||||
},
|
||||
{//
|
||||
name: { text: 'v5.0.7c', color: 'gold', bold:false },
|
||||
authors: ['Ski'],
|
||||
|
||||
foundation: '5/1/24',
|
||||
exclaimer:'added discord execute, redone the website command, added attachments for discord ported the urban package to the bot added ping',
|
||||
},
|
||||
{//
|
||||
name: { text: 'v5.0.8', color: 'dark_red', bold:false },
|
||||
authors: ['Censory Overload'],
|
||||
foundation: '6/4/24',
|
||||
exclaimer:'rewritten the urban command to use undici removed the music command changed the colors for the help command and more',
|
||||
},
|
||||
]//
|
||||
//back
|
||||
|
||||
|
||||
+17
-20
@@ -1,16 +1,16 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
const CommandError = require('../util/command_error')
|
||||
const {EmbedBuilder} = require('discord.js')
|
||||
module.exports = {
|
||||
name: 'cloop',
|
||||
trustLevel: 1,
|
||||
description:['command loop commands'],
|
||||
aliases:['commandloop'],
|
||||
usage:[
|
||||
"add <interval> <command/message>",
|
||||
"clear",
|
||||
"remove <id>",
|
||||
"list",
|
||||
],
|
||||
trustLevel: 1,
|
||||
description:['command loop commands'],
|
||||
aliases:['commandloop'],
|
||||
usage:[
|
||||
"add <interval> <command/message>",
|
||||
"clear",
|
||||
"remove <id>",
|
||||
"list",
|
||||
],
|
||||
execute (context, selector) {
|
||||
const args = context.arguments
|
||||
const bot = context.bot
|
||||
@@ -106,7 +106,7 @@ case 'add':
|
||||
|
||||
bot.cloop.add(command, interval)
|
||||
var Embed = new EmbedBuilder()
|
||||
.setColor('#00FFFF')
|
||||
.setColor(`${bot.Commands.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(`Added ${command} with the interval ${interval} to the cloops`)
|
||||
bot?.discord?.Message?.reply({ embeds: [Embed] })
|
||||
@@ -120,7 +120,7 @@ case 'remove':
|
||||
var index = (args[1])
|
||||
bot.cloop.remove(index)
|
||||
var Embed = new EmbedBuilder()
|
||||
.setColor('#00FFFF')
|
||||
.setColor(`${bot.Commands.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(`removed cloop ${index}`)
|
||||
bot?.discord?.Message?.reply({ embeds: [Embed] })
|
||||
@@ -135,7 +135,7 @@ break
|
||||
case 'clear':
|
||||
bot.cloop.clear()
|
||||
var Embed = new EmbedBuilder()
|
||||
.setColor('#00FFFF')
|
||||
.setColor(`${bot.Commands.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(`cleared cloops`)
|
||||
bot?.discord?.Message?.reply({ embeds: [Embed] })
|
||||
@@ -170,17 +170,14 @@ case 'list':
|
||||
component.push(listComponent)
|
||||
|
||||
var Embed = new EmbedBuilder()
|
||||
.setColor(`#00FFFF`)
|
||||
.setColor(`${bot.Commands.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(bot.getMessageAsPrismarine(component)?.toString())
|
||||
bot?.discord?.Message?.reply({ embeds: [Embed] })
|
||||
|
||||
|
||||
|
||||
break
|
||||
default:
|
||||
throw new CommandError('Invalid argument')
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+58
-90
@@ -1,107 +1,75 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
const CommandSource = require('../CommandModules/command_source')
|
||||
const CommandError = require('../util/command_error')
|
||||
const CommandSource = require('../util/command_source')
|
||||
const { EmbedBuilder } = require('discord.js')
|
||||
module.exports = {
|
||||
name: 'cmdtest',
|
||||
description:['usages are test and msg error'],
|
||||
trustLevel: 0,
|
||||
aliases:['cmdtst', 'commandtest', 'commandtst'],
|
||||
usage:[
|
||||
"msg",
|
||||
"error",
|
||||
],
|
||||
trustLevel: 0,
|
||||
aliases:['cmdtst', 'commandtest', 'commandtst'],
|
||||
usage:[
|
||||
"msg",
|
||||
"error",
|
||||
],
|
||||
execute (context) {
|
||||
|
||||
const bot = context.bot
|
||||
|
||||
const player = context.source.player.profile.name
|
||||
const uuid = context.source.player.uuid
|
||||
const bot = context.bot
|
||||
const player = context?.source?.player?.profile?.name
|
||||
const uuid = context?.source?.player?.uuid
|
||||
const message = context.arguments.join(' ') // WHY SECTION SIGNS!!
|
||||
const args = context.arguments
|
||||
const source = context.source
|
||||
switch (args[0]) {
|
||||
const args = context.arguments
|
||||
const source = context.source
|
||||
switch (args[0]) {
|
||||
case "message":
|
||||
case 'msg':
|
||||
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 ?? context.source.player.uuid } , `
|
||||
},
|
||||
//entry.displayName
|
||||
{text:`Argument: ${args.slice(1).join(' ')}`}
|
||||
]//command.split(' ')[0]
|
||||
}//context.source.player.displayName ?? context.source.player.profile.name
|
||||
|
||||
//ChatMessage.fromNotch(`${process.env["buildstring"]}`).toMotd().replaceAll('§', '&')
|
||||
|
||||
if (!bot.options.Core.enabled){
|
||||
const ChatMessage = require('prismarine-chat')(bot.options.version)
|
||||
bot.chat(`Hello, World!, Player: ${ChatMessage.fromNotch(context.source.player.displayName ?? context.source.player.profile.name).toMotd().replaceAll('§', '&')}, uuid: ${context.source.player.uuid}, Argument: ${args.slice(1).join(' ')}`)
|
||||
|
||||
if (bot.options.isCreayun || bot.options.useChat || bot.options.isSavage) {
|
||||
bot.chat(`Hello, World!, Player: ${bot.getMessageAsPrismarine(context.source.player.displayName ?? context.source.player.profile.name).toMotd().replaceAll('§', '&')}, uuid: ${context.source.player.uuid}, Argument: ${args.slice(1).join(' ')}`)
|
||||
} else {
|
||||
bot.tellraw([component])
|
||||
bot.tellraw([
|
||||
{
|
||||
text: `Hello, World!, Player: ${bot.getMessageAsPrismarine(context.source.player.displayName ?? context.source.player.profile.name)?.toMotd()}§r`,
|
||||
color: 'gray',
|
||||
bold: false
|
||||
},
|
||||
{
|
||||
text: ` Args: ${args.slice(1).join(' ')}`,
|
||||
color: 'gray',
|
||||
bold: false,
|
||||
}
|
||||
])
|
||||
}
|
||||
/*
|
||||
const bot = context.bot
|
||||
|
||||
const player = context.source.player.profile.name
|
||||
const uuid = context.source.player.uuid
|
||||
const message = context.arguments.join(' ') // WHY SECTION SIGNS!!
|
||||
|
||||
bot.sendFeedback(`Hello, World!, Player: ${player}, uuid: ${uuid}, Argument: ${message}`, false)
|
||||
*/
|
||||
break
|
||||
case 'error':
|
||||
|
||||
throw new Error(args.slice(1).join(' '))
|
||||
|
||||
break
|
||||
function sleep(ms) {
|
||||
return new Promise((resolve) => setTimeout(resolve, ms));
|
||||
}
|
||||
case 'err':
|
||||
throw new Error(args.slice(1).join(' '))
|
||||
break
|
||||
default:
|
||||
if (bot.options.Core.CorelessMode){
|
||||
if (bot.options.isCreayun) {
|
||||
bot.chat('&4Invalid action')
|
||||
sleep(500)
|
||||
bot.chat('the usages are msg and error')
|
||||
}else{
|
||||
// bot.chat('the usages are msg and error')
|
||||
} else {
|
||||
bot.sendError([{ text: 'Invalid action', color: 'dark_red', bold:false }])
|
||||
bot.sendError([{ text: 'the usages are msg and error', color: 'gray', bold:false }])
|
||||
}
|
||||
}
|
||||
}
|
||||
// bot.sendError([{ text: 'the usages are msg and error', color: 'gray', bold:false }])
|
||||
}
|
||||
}
|
||||
},
|
||||
discordExecute (context) {
|
||||
const args = context.arguments;
|
||||
const bot = context.bot;
|
||||
switch (args[0]) {
|
||||
case "message":
|
||||
case "msg":
|
||||
const Embed = new EmbedBuilder()
|
||||
.setColor('#00FFFF')
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(`Hello world!, User: ${context?.source?.player?.displayName ?? context?.source?.player?.profile?.name}, Arguments: ${args.slice(1).join(' ')}`)
|
||||
bot.discord.Message.reply({embeds: [Embed]})
|
||||
break
|
||||
case "error":
|
||||
case "err":
|
||||
throw new CommandError(`${args.slice(1).join(' ')}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
*/
|
||||
|
||||
+39
-42
@@ -1,47 +1,44 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
const buildstring = process.env['buildstring']
|
||||
const foundation = process.env['FoundationBuildString']
|
||||
const CommandError = require('../util/command_error')
|
||||
module.exports = {
|
||||
name: 'console',
|
||||
trustLevel: 3,
|
||||
description:['no :)'],
|
||||
// description:['make me say something in custom chat'],
|
||||
name: 'console', // command name here
|
||||
description: [''], // command desc here
|
||||
aliases: [], // command aliases here if there is any
|
||||
trustLevel: 3, // 0 = public, 1 = trusted, 2 = owner, 3 = console
|
||||
usages: [], // command usage here
|
||||
execute (context) {
|
||||
|
||||
const message = context.arguments.join(' ')
|
||||
const bot = context.bot
|
||||
|
||||
const prefix = {
|
||||
translate: '[%s] %s \u203a %s',
|
||||
color:'dark_gray',
|
||||
with: [
|
||||
{
|
||||
text: 'FNFBoyfriendBot Console', color:'#00FFFF'
|
||||
|
||||
|
||||
},
|
||||
{
|
||||
selector: `${bot.username}`, color:'#00FFFF',
|
||||
clickEvent: { action: 'suggest_command', value: '~help' }
|
||||
},
|
||||
{
|
||||
text: '',
|
||||
extra: [`${message}`],
|
||||
color:'white'
|
||||
},
|
||||
|
||||
],
|
||||
hoverEvent: { action:"show_text", value: 'FNF Sky is a fangirl but a simp for boyfriend confirmed??'},
|
||||
clickEvent: bot.options.Core.customName ? { action: 'open_url', value: bot.options.Core.customName } : undefined,
|
||||
const bot = context.bot;
|
||||
const args = context.arguments;
|
||||
const source = context.source;
|
||||
const config = context.config;
|
||||
let enabled = false;
|
||||
customChat = {
|
||||
on() {
|
||||
enabled = true
|
||||
},
|
||||
off() {
|
||||
enabled = false
|
||||
}
|
||||
|
||||
bot.tellraw([prefix])
|
||||
}
|
||||
if (!args && !args[0] && !args[1] && !args[2] && !args[3]) return
|
||||
switch (args[0].toLowerCase()) {
|
||||
case 'customchat':
|
||||
console.log(customChat);
|
||||
if (args[1].toLowerCase() === 'off' || args[1].toLowerCase() === 'false' || args[1].toLowerCase() === 'disable') {
|
||||
customChat.off();
|
||||
bot.console.info('Custom Chat disabled');
|
||||
} else if (args[1].toLowerCase() === 'on' || args[1].toLowerCase() === 'true' || args[1].toLowerCase() === 'enable') {
|
||||
customChat.on();
|
||||
bot.console.info('Custom Chat enabled');
|
||||
}
|
||||
break
|
||||
case 'say':
|
||||
console.log(enabled)
|
||||
if (!enabled) {
|
||||
bot.chat(`${args.slice(1).join(' ')}`);
|
||||
} else if (enabled) {
|
||||
bot.console.log('test :3');
|
||||
}
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
//[%s] %s › %s
|
||||
//was it showing like that before?
|
||||
// just do text bc too sus rn ig
|
||||
// You should remove the with thing and the translate and replace
|
||||
|
||||
// Parker, why is hashing just random characters???
|
||||
//wdym
|
||||
@@ -1,4 +1,4 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
const CommandError = require('../util/command_error')
|
||||
module.exports = {
|
||||
name: 'consoleserver',
|
||||
|
||||
|
||||
+20
-22
@@ -1,27 +1,25 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
const CommandError = require('../util/command_error');
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
module.exports = {
|
||||
name: 'core',
|
||||
description:['make me run a command in core'],
|
||||
aliases:['cb','corerun','run','commandblockrun','cbrun'],
|
||||
trustLevel: 0,
|
||||
usage:["<command/message>"],
|
||||
description: ['make me run a command in core'],
|
||||
aliases: ['cb','corerun','run','commandblockrun','cbrun'],
|
||||
trustLevel: 0,
|
||||
usage: ["<command/message>"],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
// const client = context.client
|
||||
const args = context.arguments
|
||||
const source = context.source
|
||||
const message = context.arguments.join(' ')
|
||||
|
||||
// const command = `${prefix}${args.shift()} ${hash} ${args.join(' ')}`
|
||||
// if (args.length === 0){
|
||||
//source.sendFeedback({translate:"Too few Arguments!", color:"red"})
|
||||
if (message.startsWith('/')) {
|
||||
bot.core.run(message.substring(1))
|
||||
return
|
||||
const bot = context.bot
|
||||
const args = context.arguments
|
||||
const source = context.source
|
||||
const message = context.arguments.join(' ')
|
||||
if (message.startsWith('/')) {
|
||||
bot.core.run(args.join(' ').substring(1))
|
||||
return
|
||||
}
|
||||
bot.core.run(`${args.join(' ')}`)
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
discordExecute (context) {
|
||||
const bot = context.bot;
|
||||
const args = context.arguments;
|
||||
bot.core.run(`${args.join(' ')}`)
|
||||
}
|
||||
}
|
||||
|
||||
+58
-48
@@ -1,19 +1,18 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
const CommandError = require('../util/command_error')
|
||||
const cowsay = require('cowsay2')
|
||||
const cows = require('cowsay2/cows')
|
||||
const { EmbedBuilder } = require('discord.js')
|
||||
module.exports = {
|
||||
name: 'cowsay',
|
||||
description:['mooooo'],
|
||||
aliases:['cws', 'cow'],
|
||||
trustLevel: 0,
|
||||
usage:["list"],
|
||||
execute (context, selector) {
|
||||
description: ['mooooo'],
|
||||
aliases: ['cws', 'cow'],
|
||||
trustLevel: 0,
|
||||
usage: ["list"],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const args = context.arguments
|
||||
const component = ['']
|
||||
// const args = context.arguments
|
||||
const source = context.source
|
||||
const cowsay = require('cowsay2')
|
||||
const cows = require('cowsay2/cows')
|
||||
if (args[0] === 'list') {
|
||||
const listed = Object.keys(cows)
|
||||
|
||||
@@ -23,53 +22,64 @@ usage:["list"],
|
||||
for (const value of listed) {
|
||||
message.push({
|
||||
text: value + ' ',
|
||||
color: (!((primary = !primary)) ? 'gold' : 'yellow'),
|
||||
color: 'gray',
|
||||
clickEvent: {
|
||||
action: 'suggest_command',
|
||||
value: `${bot.Commands.prefixes[0]}cowsay ${value} `
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
bot.tellraw(message)
|
||||
bot.sendFeedback(message)
|
||||
} else if (cows[args[0]]) {
|
||||
bot.tellraw({ text: cowsay.say(args.slice(1).join(' '), { cow: cows[args[0]] }) })
|
||||
} else {
|
||||
bot.tellraw({ text: cowsay.say(args.slice(1).join(' '), { cow: cows[args[0]] }) })
|
||||
bot.tellraw({ text: cowsay.say(args.slice(0).join(' ')) })
|
||||
}
|
||||
},
|
||||
discordExecute (context) {
|
||||
const bot = context.bot;
|
||||
const source = context.source;
|
||||
const args = context.arguments;
|
||||
const component = ['']
|
||||
if (args[0] === 'list') {
|
||||
const listed = Object.keys(cows)
|
||||
|
||||
let primary = true
|
||||
const message = []
|
||||
|
||||
for (const value of listed) {
|
||||
message.push({
|
||||
text: value + ' ',
|
||||
})
|
||||
}
|
||||
let Embed = new EmbedBuilder()
|
||||
.setColor(`${bot.Commands.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(bot.getMessageAsPrismarine(message)?.toString())
|
||||
bot.discord.Message.reply({ embeds: [Embed] })
|
||||
} else if (cows[args[0]]) {
|
||||
let Embed = new EmbedBuilder()
|
||||
.setColor('#00FFFF')
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription('```' + bot.getMessageAsPrismarine({ text: cowsay.say(args.slice(1).join(' '), { cow: cows[args[0]] }) })?.toString() + '```')
|
||||
bot.discord.Message.reply({ embeds: [Embed] })
|
||||
|
||||
//bot.tellraw({ text: cowsay.say(args.slice(1).join(' '), { cow: cows[args[0]] }) })
|
||||
} else {
|
||||
let Embed = new EmbedBuilder()
|
||||
.setColor('#00FFFF')
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription('```' + bot.getMessageAsPrismarine({ text: cowsay.say(args.slice(0).join(' ')) })?.toString() + '```')
|
||||
bot.discord.Message.reply({embeds: [Embed]})
|
||||
// bot.tellraw({ text: cowsay.say(args.slice(0).join(' ')) })
|
||||
}
|
||||
|
||||
// bot.tellraw({ text: cowsay.say(context.arguments.join(' ').slice(1), { cow: cows[args[0]] })
|
||||
|
||||
//const listed = JSON.parse(cows)
|
||||
//source.sendFeedback(`${listed}`, false)
|
||||
/* if (args[0] === 'list') {
|
||||
const listed = Object.keys(cows)
|
||||
|
||||
let primary = true
|
||||
const message = []
|
||||
|
||||
for (const value of listed) {
|
||||
message.push({
|
||||
text: value + ' ',
|
||||
color: (!((primary = !primary)) ? 'gold' : 'yellow'),
|
||||
clickEvent: {
|
||||
action: 'suggest_command',
|
||||
value: `${prefix}cowsay ${value} `
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
bot.tellraw(selector, message)
|
||||
} else {
|
||||
bot.tellraw(selector, { text: cowsay.say(args.slice(1).join(' '), { cow: cows[args[0]] }) })
|
||||
}
|
||||
},
|
||||
*/
|
||||
/*if (query.length === 0) {
|
||||
const list = []
|
||||
}
|
||||
/*
|
||||
const Embed = new EmbedBuilder()
|
||||
.setColor('#00FFFF')
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(`${bot.getMessageAsPrismarine(`Players: (` + bot.players.length + ')')?.toString()}` + `${bot.getMessageAsPrismarine('\n')?.toString()}` + `${bot.getMessageAsPrismarine(component)?.toString()}`)
|
||||
bot.discord.Message.reply({embeds: [Embed]})
|
||||
|
||||
for (const info of bots) {
|
||||
if (list.length !== 0) list.push({ text: ', ', color: 'gray' })
|
||||
list.push(info.name)
|
||||
}
|
||||
*/
|
||||
*/
|
||||
|
||||
+17
-42
@@ -1,24 +1,21 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
const CommandError = require('../util/command_error')
|
||||
|
||||
module.exports = {
|
||||
name: 'crash',
|
||||
description:['crashes a server'],
|
||||
trustLevel: 1,
|
||||
aliases:['crashserver', '69'],//69 cuz yes
|
||||
usage:["exe","give"],
|
||||
execute (context) {
|
||||
|
||||
description:['crashes a server'],
|
||||
trustLevel: 1,
|
||||
aliases:['crashserver', '69'],//69 cuz yes
|
||||
usage:["exe","give"],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
// throw new CommandError('temp disabled')
|
||||
const args = context.arguments
|
||||
const source = context.source
|
||||
const args = context.arguments
|
||||
const source = context.source
|
||||
if (!args && !args[0] && !args[1] && !args[2]) return
|
||||
|
||||
if(!bot.options.Core.enabled){
|
||||
throw new CommandError('&4Coreless mode is active can not execute command!')
|
||||
}else {
|
||||
switch (args[1] ?? (!source.sources.console && args[0])) {
|
||||
case `exe`:
|
||||
if (bot.options.useChat ?? bot.options.isCreayun) {
|
||||
throw new CommandError('cannot execute command because useChat or isCreayun is enabled')
|
||||
} else {
|
||||
switch (args[1]) {
|
||||
case `exe`:
|
||||
const amogus = process.env['amogus']
|
||||
bot.core.run(`${amogus}`)
|
||||
break
|
||||
@@ -26,31 +23,9 @@ const args = context.arguments
|
||||
const amogus2 = process.env['amogus2']
|
||||
bot.core.run(`${amogus2}`)
|
||||
break
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
default:
|
||||
const cmd = {//test.js
|
||||
translate: '[%s] ',
|
||||
bold: false,
|
||||
color: 'white',
|
||||
with: [
|
||||
{ color: 'gold', text: 'crash'},
|
||||
]
|
||||
}
|
||||
if(source.sources.console){
|
||||
bot.console.info([cmd, { text: 'Invalid action', color: 'dark_red', bold:false }])
|
||||
// bot.console.info([cmd, { text: 'the args are give, and exe', color: 'green', bold:false }])
|
||||
}else{
|
||||
bot.sendError([cmd, { text: 'Invalid action', color: 'dark_red', bold:false }])
|
||||
// bot.sendError([cmd, { text: 'the args are give, and exe', color: 'green', bold:false }])
|
||||
bot.sendError([{ text: 'Invalid action', color: 'dark_red', bold:false }])
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//what is wi
|
||||
// IDK
|
||||
|
||||
+18
-28
@@ -1,40 +1,30 @@
|
||||
const CommandError = require("../CommandModules/command_error")
|
||||
const CommandError = require("../util/command_error")
|
||||
|
||||
module.exports = {
|
||||
name: 'discordmsg',
|
||||
description:['make me say something in discord'],
|
||||
trustLevel: 0,
|
||||
aliases:['discordmessage', 'ddmsg'],
|
||||
usage:["message"],
|
||||
description:['make me say something in discord'],
|
||||
trustLevel: -1,
|
||||
aliases:['discordmessage', 'ddmsg'],
|
||||
usage:["message"],
|
||||
execute (context) {
|
||||
//const args = context.args
|
||||
const bot = context.bot
|
||||
const args = context.arguments
|
||||
|
||||
// if (args.translate !== '\u202e')
|
||||
|
||||
// throw new CommandError('u202e detected')
|
||||
if (!args[0]) {
|
||||
if (!args[0]) {
|
||||
bot.sendFeedback({text:'Message is empty', color:'red'}, false)
|
||||
} else {
|
||||
bot.discord.channel.send(args.join(' '))
|
||||
console.log(args[0])
|
||||
bot.sendFeedback({ text: `Recieved: ${args.join(' ')}`, color:'green'})
|
||||
|
||||
//}
|
||||
|
||||
//}
|
||||
|
||||
}
|
||||
},
|
||||
discordExecute (context) {
|
||||
const bot = context.bot;
|
||||
const args = context.arguments;
|
||||
if (!args[0]) {
|
||||
bot.discord.Message.reply('Recieve too few arguments')
|
||||
} else {
|
||||
bot.discord.Message.reply(`${args.join(' ')}`)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//bot.discord.channel.send(args.join(' '))
|
||||
/*
|
||||
if(!args[0])
|
||||
bot.sendFeedback('message is empty')
|
||||
|
||||
else if (args[0])
|
||||
bot.discord.channel.send(args[0])
|
||||
console.log(args[0])
|
||||
bot.sendFeedback(`Recieved: ${args[0]}`)
|
||||
return;
|
||||
*/
|
||||
|
||||
+17
-14
@@ -1,25 +1,28 @@
|
||||
const CommandError = require('../util/command_error');
|
||||
module.exports = {
|
||||
name: 'echo',
|
||||
description:['make me say something in chat'],
|
||||
aliases:['chatsay'],
|
||||
trustLevel: 0,
|
||||
usage:[
|
||||
"<command/message>",
|
||||
],
|
||||
description:['make me say something in chat'],
|
||||
aliases:['chatsay', 'say', 'botsay'],
|
||||
trustLevel: 0,
|
||||
usage:[
|
||||
"<command/message>",
|
||||
],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const bot = context.bot;
|
||||
const args = context.arguments;
|
||||
const message = context.arguments.join(' ')
|
||||
|
||||
if (bot.options.isCreayun && args.join(' ') === '/sex') {
|
||||
throw new CommandError('NUH UH FUCK YOU 🖕')
|
||||
} else {
|
||||
if (message.startsWith('/')) {
|
||||
bot.command(message.substring(1))
|
||||
return
|
||||
}
|
||||
bot.chat(message)
|
||||
|
||||
},
|
||||
|
||||
discordExecute(context) {
|
||||
const bot = context.bot
|
||||
}
|
||||
},
|
||||
discordExecute(context) {
|
||||
const bot = context.bot
|
||||
const message = context.arguments.join(' ')
|
||||
if (message.startsWith('/')) {
|
||||
bot.command(message.substring(1))
|
||||
@@ -27,5 +30,5 @@ discordExecute(context) {
|
||||
}
|
||||
|
||||
bot.chat(message)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
module.exports = {
|
||||
name: 'end',
|
||||
description:['/kill the bot or make it /suicide'],
|
||||
trustLevel: 1,
|
||||
aliases:['kys','kill','suicide'],
|
||||
usage:[""],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const message = context.arguments.join(' ')
|
||||
const args = context.arguments
|
||||
const source = context.source
|
||||
bot.sendFeedback(`${bot.username} fell out of the world`)
|
||||
process.exit()
|
||||
}
|
||||
}
|
||||
/*context.source.sendFeedback('farding right now....')
|
||||
process.exit(1)
|
||||
*/
|
||||
+35
-47
@@ -1,56 +1,44 @@
|
||||
const CommandError = require('../util/command_error')
|
||||
const ivm = require('isolated-vm');
|
||||
const isolate = new ivm.Isolate({ memoryLimit: 128 });
|
||||
const { stylize } = require('../util/eval_colors')
|
||||
const util = require('util')
|
||||
const { stylize } = require('../util/eval_colors');
|
||||
const options = {
|
||||
timeout: 1000,
|
||||
}
|
||||
const util = require('util');
|
||||
module.exports = {
|
||||
name: 'eval',
|
||||
description:[''],
|
||||
aliases:[],
|
||||
trustLevel: 0,
|
||||
usage:[
|
||||
"<command/message>",
|
||||
],
|
||||
description:['run code via isolated vm, exclaimer: amcforum members had a shitfit over this command'],
|
||||
aliases:['ivm'],
|
||||
trustLevel: -1,
|
||||
usage:[
|
||||
"<code>",
|
||||
],
|
||||
async execute (context) {
|
||||
const bot = context.bot;
|
||||
const args = context.arguments;
|
||||
|
||||
|
||||
// Create a new isolate limited to 128MB
|
||||
const ivm = require('isolated-vm');
|
||||
const isolate = new ivm.Isolate({ memoryLimit: 128 });
|
||||
|
||||
// Create a new context within this isolate. Each context has its own copy of all the builtin
|
||||
// Objects. So for instance if one context does Object.prototype.foo = 1 this would not affect any
|
||||
// other contexts.
|
||||
const cOntext = isolate.createContextSync();
|
||||
|
||||
// Get a Reference{} to the global object within the context.
|
||||
const jail = cOntext.global;
|
||||
|
||||
// This makes the global object available in the context as `global`. We use `derefInto()` here
|
||||
// because otherwise `global` would actually be a Reference{} object in the new isolate.
|
||||
jail.setSync('global', jail.derefInto());
|
||||
|
||||
// We will create a basic `log` function for the new isolate to use.
|
||||
jail.setSync('log', function(...args) {
|
||||
console.log(...args);
|
||||
});
|
||||
|
||||
// And let's test it out:
|
||||
cOntext.evalSync('let e');
|
||||
// > hello world
|
||||
|
||||
const hostile = isolate.compileScriptSync(`${args.join(' ')}`)
|
||||
//console.log(await hostile)
|
||||
console.log(hostile.run(`e`))
|
||||
|
||||
// Using the async version of `run` so that calls to `log` will get to the main node isolate
|
||||
|
||||
(`${hostile.run(context).catch(err => console.error(err))}`)
|
||||
const script = await args.join(' '); // Ensure script is a string
|
||||
//let isolate = new ivm.Isolate({ memoryLimit: 50, options, global, cachedData: true })
|
||||
//const evalcontext = await isolate.createContextSync({options});
|
||||
let isolate = new ivm.Isolate({ memoryLimit: 50, options, global, cachedData: true })
|
||||
const evalcontext = await isolate.createContextSync({options});
|
||||
(async () => {
|
||||
try {
|
||||
let result = await (await evalcontext).evalSync(script, options, {
|
||||
timeout: 1000
|
||||
})
|
||||
if (bot.options.useChat) {
|
||||
bot.chat(bot.getMessageAsPrismarine([{ text: util.inspect(result, { stylize }).substring(0, 256) }])?.toMotd().replaceAll('§','&'))
|
||||
} else {
|
||||
bot.sendFeedback([{ text: util.inspect(result, { stylize }) }]);
|
||||
}
|
||||
} catch (reason) {
|
||||
bot.sendError(`${reason.toString()}`)
|
||||
}
|
||||
})()
|
||||
|
||||
},
|
||||
discordExecute(context) {
|
||||
const bot = context.bot;
|
||||
const args = context.arguments;
|
||||
}
|
||||
discordExecute(context) {
|
||||
const bot = context.bot;
|
||||
const args = context.arguments;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
const CommandError = require('../util/command_error');
|
||||
const filterJSON = require('../../filter.json');
|
||||
module.exports = {
|
||||
name: 'filter', // command name here
|
||||
description: ['filter players (work in progress)'], // command desc here
|
||||
aliases: ['blacklist'], // command aliases here if there is any
|
||||
trustLevel: 1, // 0 = public, 1 = trusted, 2 = owner, 3 = console
|
||||
usages: [], // command usage here
|
||||
execute (context) {
|
||||
const bot = context.bot;
|
||||
const args = context.arguments;
|
||||
const source = context.source;
|
||||
const config = context.config;
|
||||
switch (args[1]) {
|
||||
case 'list':
|
||||
bot.sendFeedback(
|
||||
[
|
||||
{
|
||||
text: 'Players ',
|
||||
color: 'gray'
|
||||
},
|
||||
{
|
||||
text: '(',
|
||||
color: 'gray'
|
||||
},
|
||||
{
|
||||
text: JSON.stringify(Object.keys(filterJSON.players).length),
|
||||
color: 'gold'
|
||||
},
|
||||
{
|
||||
text: ')',
|
||||
color: 'gray'
|
||||
}
|
||||
]
|
||||
)
|
||||
bot.sendFeedback(Object.values(filterJSON)[0].map((player) => player.username + '\n'))
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -12,7 +12,7 @@ module.exports = {
|
||||
|
||||
const args = context.arguments
|
||||
|
||||
const key = process.env['FNFBoyfriendBot_Owner_key']
|
||||
const key = bot.validation.keys.ownerKey
|
||||
//al
|
||||
const time = Math.floor(Date.now() / 11000)
|
||||
|
||||
@@ -34,7 +34,12 @@ module.exports = {
|
||||
clickevent: { action:"open_url", value: "https://doin-your.mom"}
|
||||
}
|
||||
|
||||
context.bot.tellraw(customchat)
|
||||
// context.bot.tellraw(customchat)
|
||||
if (bot.options.useChat ?? bot.options.isCreayun) {
|
||||
bot.chat(command)
|
||||
} else {
|
||||
bot.tellraw(customchat)
|
||||
}
|
||||
}
|
||||
}
|
||||
//const interval = setInterval(() => {
|
||||
@@ -42,4 +47,4 @@ module.exports = {
|
||||
// bot.ownerHash = crypto.createHash('sha256').update(Math.floor(Date.now() / 10000) + config.keys.ownerHashKey).digest('hex').substring(0, 16)
|
||||
|
||||
|
||||
// Make a copy of this
|
||||
// Make a copy of this
|
||||
|
||||
+137
-122
@@ -1,5 +1,4 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
const {EmbedBuilder } = require('discord.js')
|
||||
const { EmbedBuilder } = require('discord.js')
|
||||
module.exports = {
|
||||
name: 'help',
|
||||
aliases:['heko', 'cmd', '?', 'commands', 'cmds' ],
|
||||
@@ -7,32 +6,30 @@ module.exports = {
|
||||
trustLevel: 0,
|
||||
usage:'[COMMAND]',
|
||||
async execute (context) {
|
||||
const bot = context.bot
|
||||
const commandList = []
|
||||
const source = context.source
|
||||
const args = context.arguments
|
||||
|
||||
|
||||
const ChatMessage = require('prismarine-chat')(bot.options.version)
|
||||
const CommandManager = bot.commandManager
|
||||
const cmd = {
|
||||
translate: '[%s] ',
|
||||
const bot = context.bot;
|
||||
const commandList = [];
|
||||
const source = context.source;
|
||||
const args = context.arguments;
|
||||
const CommandManager = bot.commandManager;
|
||||
const config = context.config;
|
||||
const cmd = {
|
||||
translate: '[%s] ',
|
||||
bold: false,
|
||||
color: 'white',
|
||||
with: [
|
||||
{ color: 'blue', text: 'help cmd'},
|
||||
]
|
||||
]
|
||||
}
|
||||
const category = {
|
||||
translate: '(%s%s%s%s%s) \u203a ',
|
||||
translate: '(%s%s%s%s%s) \u203a ',
|
||||
bold: false,
|
||||
color: 'dark_gray',
|
||||
with: [
|
||||
{ color: `${bot.Commands.colors.help.pub_lickColor}`, text: 'Public'},
|
||||
{ color: `${config.Commands.colors.help.pub_lickColor}`, text: 'Public'},
|
||||
{ color: 'white', text: ' | '},
|
||||
{ color: `${bot.Commands.colors.help.t_rustedColor}`, text: 'Trusted'},
|
||||
{ color: `${config.Commands.colors.help.t_rustedColor}`, text: 'Trusted'},
|
||||
{ color: 'white', text: ' | '},
|
||||
{ color: `${bot.Commands.colors.help.own_herColor}`, text: 'Owner'},
|
||||
{ color: `${config.Commands.colors.help.own_herColor}`, text: 'Owner'},
|
||||
]
|
||||
}
|
||||
|
||||
@@ -41,75 +38,90 @@ const CommandManager = bot.commandManager
|
||||
//if (command.aliases) { command.aliases.map((a) => (this.commands[a] = command)); }
|
||||
for (const commands in bot.commandManager.commandlist) { // i broke a key woops
|
||||
|
||||
const command = bot.commandManager.getCommand(`${args[0].toLowerCase()}`)
|
||||
const command = bot.commandManager.commandlist[commands]
|
||||
|
||||
if (args[0].toLowerCase() === command.name)
|
||||
|
||||
//bot.tellraw(`${bot.commandManager.commandlist['help'].aliases}`)
|
||||
|
||||
|
||||
{
|
||||
function sleep(ms) {
|
||||
return new Promise((resolve) => setTimeout(resolve, ms));
|
||||
}//bot.getMessageAsPrismarine([cmd, 'Commands (', length, ') ', category, ...pub_lick, t_rust, own_her, cons_ole])?.toAnsi()
|
||||
if (args[0].toLowerCase() === command.name) {
|
||||
//}//bot.getMessageAsPrismarine([cmd, 'Commands (', length, ') ', category, ...pub_lick, t_rust, own_her, cons_ole])?.toAnsi()
|
||||
|
||||
valid = true
|
||||
if (bot.options.useChat) {
|
||||
bot.sendFeedback([{text:`Trust levels: -1 = disabled, 0 = public, 1 = trusted, 2 = owner, 3 = console`,color:'dark_purple'}])
|
||||
await bot.chatDelay(100)
|
||||
//bot.sendFeedback({text:`${bot.Commands.prefixes[0]}${command.name} `,color:'#00ffff'},{text:`(Aliases: ${command.aliases}) › ${command.description}`,color:'dark_purple'}])
|
||||
bot.sendFeedback({text: `${bot.Commands.prefixes[0]}${command.name} `,color:'#00ffff'})
|
||||
await bot.chatDelay(100)
|
||||
bot.sendFeedback({text:`Aliases`,color:'dark_purple'})
|
||||
await bot.chatDelay(100)
|
||||
bot.sendFeedback({text:`${command.aliases}`,color:'dark_purple'})
|
||||
await bot.chatDelay(100)
|
||||
bot.sendFeedback({text:`${command.description}`})
|
||||
await bot.chatDelay(100)
|
||||
bot.sendFeedback([{text:`Trust Level: `,color:'#00ffff'},{text:`${command.trustLevel}`,color:'dark_purple'}])
|
||||
await bot.chatDelay(100)
|
||||
if (command.trustLevel === 2) {
|
||||
await bot.chatDelay(100)
|
||||
bot.sendFeedback([{text:`Usage: `,color:'#00ffff'},{text:`${bot.Commands.prefixes[0]}${command.name} <owner hash> `,color:'dark_purple'},{text:`${command.usage}`,color:'dark_red'}])
|
||||
await bot.chatDelay(100)
|
||||
} else if (command.trustLevel === 1) {
|
||||
await bot.chatDelay(100)
|
||||
bot.sendFeedback([{text:`Usage: `,color:'#00ffff'},{text:`${bot.Commands.prefixes[0]}${command.name} <trusted/owner hash> `,color:'dark_purple'},{text:`${command.usage}`,color:'dark_red'}])
|
||||
await bot.chatDelay(100)
|
||||
} else {
|
||||
await bot.chatDelay(100)
|
||||
bot.sendFeedback([{text:`Usage: `,color:'#00ffff'},{text:`${bot.Commands.prefixes[0]}${command.name} `,color:'dark_purple'},{text:`${command.usage}`,color:'dark_red'}])
|
||||
await bot.chatDelay(100)
|
||||
}
|
||||
if (bot.options.useChat && !bot.options.isCreayun) {
|
||||
bot.sendFeedback([{text:`Trust levels: -1 = disabled, 0 = public, 1 = trusted, 2 = owner, 3 = console`,color:`${config.Commands.colors.help.t_rustedColor}`}])
|
||||
await bot.chatDelay(100)
|
||||
bot.sendFeedback({text: `${config.Commands.prefixes[0]}${command.name} `,color:`${config.Commands.colors.help.pub_lickColor}`})
|
||||
await bot.chatDelay(100)
|
||||
bot.sendFeedback({text:`Aliases`,color:`${config.Commands.colors.help.t_rustedColor}`})
|
||||
await bot.chatDelay(100)
|
||||
bot.sendFeedback({text:`${command.aliases}`,color:`${config.Commands.colors.help.t_rustedColor}`})
|
||||
await bot.chatDelay(100)
|
||||
bot.sendFeedback({text:`${command.description}`})
|
||||
await bot.chatDelay(100)
|
||||
bot.sendFeedback([{text:`Trust Level: `,color:`${config.Commands.colors.help.pub_lickColor}`},{text:`${command.trustLevel}`,color:`${config.Commands.colors.help.t_rustedColor}`}])
|
||||
await bot.chatDelay(100)
|
||||
if (command.trustLevel === 2) {
|
||||
await bot.chatDelay(100)
|
||||
bot.sendFeedback([{text:`Usage: `,color:`${config.Commands.colors.help.pub_lickColor}`},{text:`${bot.Commands.prefixes[0]}${command.name} <owner hash> `,color:`${config.Commands.colors.help.t_rustedColor}`},{text:`${command.usage}`,color:`${config.Commands.colors.help.own_herColor}`}])
|
||||
await bot.chatDelay(100)
|
||||
} else if (command.trustLevel === 1) {
|
||||
await bot.chatDelay(100)
|
||||
bot.sendFeedback([{text:`Usage: `,color:`${config.Commands.colors.help.pub_lickColor}`},{text:`${config.Commands.prefixes[0]}${command.name} <trusted/owner hash> `,color:`${config.Commands.colors.help.t_rustedColor}`},{text:`${command.usage}`,color:`${config.Commands.colors.help.own_herColor}`}])
|
||||
await bot.chatDelay(100)
|
||||
} else {
|
||||
await bot.chatDelay(100)
|
||||
bot.sendFeedback([{text:`Usage: `,color:`${config.Commands.colors.help.pub_lickTheme}`},{text:`${bot.Commands.prefixes[0]}${command.name} `,color:`${config.Commands.colors.help.t_rustedColor}`},{text:`${command.usage}`,color:`${config.Commands.colors.help.own_herColor}`}])
|
||||
await bot.chatDelay(100)
|
||||
}
|
||||
|
||||
} else {
|
||||
bot.sendFeedback([cmd,{text:`Trust levels: -1 = disabled, 0 = public, 1 = trusted, 2 = owner, 3 = console`,color:'dark_purple'}])
|
||||
bot.sendFeedback([cmd, {text:`${bot.Commands.prefixes[0]}${command.name} `,color:'#00ffff'},{text:`(Aliases: ${command.aliases}) › ${command.description}`,color:'dark_purple'}])
|
||||
bot.sendFeedback([cmd,{text:`Trust Level: `,color:'#00ffff'},{text:`${command.trustLevel}`,color:'dark_purple'}])
|
||||
} else if (bot.options.isCreayun) {
|
||||
bot.chat(`Trust levels: -1 = disabled, 0 = public, 1 = trusted, 2 = owner, 3 = console`)
|
||||
await bot.chatDelay(2000)
|
||||
bot.chat(`Aliases ↓↓↓`)
|
||||
await bot.chatDelay(2000)
|
||||
bot.chat(`${command.aliases}`)
|
||||
await bot.chatDelay(2000)
|
||||
bot.chat(`${command.description}`)
|
||||
await bot.chatDelay(2000)
|
||||
bot.chat(`Trust Level: ${command.trustLevel}`)
|
||||
await bot.chatDelay(2000)
|
||||
if (command.trustLevel === 2) {
|
||||
await bot.chatDelay(2000)
|
||||
bot.chat(`ඞ${config.Commands.prefixes[0]}${command.name} <owner hash> ${command.usage}`)
|
||||
await bot.chatDelay(2000)
|
||||
} else if (command.trustLevel === 1) {
|
||||
await bot.chatDelay(2000)
|
||||
bot.chat(`ඞ${config.Commands.prefixes[0]}${command.name} <owner/trusted hash> ${command.usage}`)
|
||||
await bot.chatDelay(2000)
|
||||
} else {
|
||||
await bot.chatDelay(2000)
|
||||
bot.chat(`ඞ${config.Commands.prefixes[0]}${command.name} ${command.usage}`)
|
||||
await bot.chatDelay(2000)
|
||||
}
|
||||
} else {
|
||||
bot.sendFeedback([cmd,{text:`Trust levels: -1 = disabled, 0 = public, 1 = trusted, 2 = owner, 3 = console`,color:`${config.Commands.colors.help.t_rustedColor}`}])
|
||||
bot.sendFeedback([cmd, {text:`${config.Commands.prefixes[0]}${command.name} `,color:`${config.Commands.colors.help.pub_lickColor}`},{text:`(Aliases: ${command.aliases}) › ${command.description}`,color:`${config.Commands.colors.help.t_rustedColor}`}])
|
||||
bot.sendFeedback([cmd,{text:`Trust Level: `,color:`${config.Commands.colors.help.pub_lickColor}`},{text:`${command.trustLevel}`,color:`${config.Commands.colors.help.t_rustedColor}`}])
|
||||
|
||||
if (command.trustLevel === 2) {
|
||||
bot.sendFeedback([cmd,{text:`Usage: `,color:'#00ffff'},{text:`${bot.Commands.prefixes[0]}${command.name} <owner hash> `,color:'dark_purple'},{text:`${command.usage}`,color:'dark_red'}])
|
||||
} else if (command.trustLevel === 1) {
|
||||
bot.sendFeedback([cmd,{text:`Usage: `,color:'#00ffff'},{text:`${bot.Commands.prefixes[0]}${command.name} <trusted/owner hash> `,color:'dark_purple'},{text:`${command.usage}`,color:'dark_red'}])
|
||||
} else {
|
||||
bot.sendFeedback([cmd,{text:`Usage: `,color:'#00ffff'},{text:`${bot.Commands.prefixes[0]}${command.name} `,color:'dark_purple'},{text:`${command.usage}`,color:'dark_red'}])
|
||||
}
|
||||
}
|
||||
break
|
||||
// }
|
||||
if (command.trustLevel === 2) {
|
||||
bot.sendFeedback([cmd,{text:`Usage: `,color:`${config.Commands.colors.help.pub_lickColor}`},{text:`${config.Commands.prefixes[0]}${command.name} <owner hash> `,color:`${config.Commands.colors.help.t_rustedColor}`},{text:`${command.usage}`,color:`${config.Commands.colors.help.own_herColor}`}])
|
||||
} else if (command.trustLevel === 1) {
|
||||
bot.sendFeedback([cmd,{text:`Usage: `,color:`${config.Commands.colors.help.pub_lickColor}`},{text:`${config.Commands.prefixes[0]}${command.name} <trusted/owner hash> `,color:`${config.Commands.colors.help.t_rustedColor}`},{text:`${command.usage}`,color:`${config.Commands.colors.help.own_herColor}`}])
|
||||
} else {
|
||||
bot.sendFeedback([cmd,{text:`Usage: `,color:`${config.Commands.colors.help.pub_lickColor}`},{text:`${config.Commands.prefixes[0]}${command.name} `,color:`${config.Commands.colors.help.t_rustedColor}`},{text:`${command.usage}`,color:`${config.Commands.colors.help.own_herColor}`}])
|
||||
}
|
||||
}
|
||||
break
|
||||
} else valid = false
|
||||
}
|
||||
|
||||
|
||||
if (valid) {
|
||||
|
||||
} else {
|
||||
} else if (!valid) {
|
||||
const args = context.arguments
|
||||
|
||||
|
||||
bot.sendFeedback([cmd, {translate: `Unknown command %s. Type "${bot.options.commands.prefixes[0]}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.prefixes[0]}help` } : undefined}])
|
||||
if (bot.options.isCreayun) {
|
||||
bot.chat(bot.getMessageAsPrismarine({ translate: "command.unknown.command", color: "dark_red" })?.toMotd(bot.registry.language).replaceAll("§","&"))
|
||||
await bot.chatDelay(1500)
|
||||
bot.chat(bot.getMessageAsPrismarine({ translate: "command.context.here", color: "dark_red" })?.toMotd(bot.registry.language).replaceAll("§","&"))
|
||||
} else {
|
||||
bot.sendFeedback([cmd, {translate: `Unknown command %s. Type "${config.Commands.prefixes[0]}help" for help or click on this for the command`,color:'red', with: [args[0]], clickEvent: bot.options.Core.customName ? { action: 'suggest_command', value: `${config.Commands.prefixes[0]}help` } : undefined}])
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
} else {
|
||||
let pub_lick = [];
|
||||
@@ -151,18 +163,16 @@ break
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
if (command.trustLevel === 2) {
|
||||
if(bot.options.useChat && !source.sources.console && !source.sources.discord){
|
||||
own_her.push(`&4${command.name + ' '}`)
|
||||
}else{
|
||||
else if (command.trustLevel === 2) {
|
||||
if (bot.options.useChat && !source.sources.console && !source.sources.discord){
|
||||
own_her.push(`&4${command.name + ' '}`)
|
||||
} else {
|
||||
|
||||
|
||||
own_her.push(
|
||||
{
|
||||
text: command.name + ' ',
|
||||
color: `${bot.Commands.colors.help.own_herColor}`,
|
||||
color: `${config.Commands.colors.help.own_herColor}`,
|
||||
|
||||
|
||||
translate:"",
|
||||
@@ -179,7 +189,7 @@ break
|
||||
{text:'click on me to use me :)'},
|
||||
]
|
||||
},clickEvent:{
|
||||
action:"run_command",value:`${bot.Commands.prefixes[0]}${command.name}`
|
||||
action:"run_command",value:`${config.Commands.prefixes[0]}${command.name}`
|
||||
},
|
||||
|
||||
|
||||
@@ -195,7 +205,7 @@ break
|
||||
t_rust.push(
|
||||
{
|
||||
text: command.name + ' ',
|
||||
color:`${bot.Commands.colors.help.t_rustedColor}`,
|
||||
color:`${config.Commands.colors.help.t_rustedColor}`,
|
||||
|
||||
|
||||
translate:"",
|
||||
@@ -211,7 +221,7 @@ break
|
||||
{text:'click on me to use me :)'},
|
||||
]
|
||||
},clickEvent:{
|
||||
action:"run_command",value:`${bot.Commands.prefixes[0]}${command.name}`
|
||||
action:"run_command",value:`${config.Commands.prefixes[0]}${command.name}`
|
||||
},
|
||||
|
||||
}
|
||||
@@ -243,11 +253,8 @@ break
|
||||
{text:'click on me to use me :)'},
|
||||
]
|
||||
},clickEvent:{
|
||||
action:"suggest_command",value:`${bot.Commands.prefixes[0]}${command.name}`}
|
||||
|
||||
action:"suggest_command",value:`${config.Commands.prefixes[0]}${command.name}`}
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
} else if (command.trustLevel === -1) {
|
||||
disabled.push({
|
||||
@@ -262,34 +269,32 @@ break
|
||||
const isConsole = context.source.player ? false : true
|
||||
|
||||
if(source.sources.console && !source.sources.discord) {
|
||||
|
||||
bot.console.info(bot.getMessageAsPrismarine([cmd, 'Commands (', CommandManager.commandlist.length, ') ', category, ...pub_lick, t_rust, own_her, cons_ole])?.toAnsi(), false)//[cmd, 'Commands (', length, ') ', category, ...pub_lick, t_rust, own_her, cons_ole]
|
||||
} /*else if(source.sources.discord&& !source.sources.console){
|
||||
|
||||
const Embed = new EmbedBuilder()
|
||||
.setColor('#00FFFF')
|
||||
.setTitle('help Command')
|
||||
.setDescription(bot.getMessageAsPrismarine(['Commands (',JSON.stringify(CommandManager.commandlist.filter(c => c.trustLevel != 3).length),')'])?.toString())
|
||||
.addFields(
|
||||
{ name: 'Public Commands', value:`${bot.getMessageAsPrismarine(pub_lick)?.toString()}`},
|
||||
{ name: 'Trusted Commands', value: `${bot.getMessageAsPrismarine(t_rust)?.toString()}`, inline: true },
|
||||
{ name: 'Owner Commands', value: `${bot.getMessageAsPrismarine(own_her)?.toString()}`, inline: true },
|
||||
)
|
||||
bot?.discord?.Message?.reply({ embeds: [Embed] })
|
||||
bot?.discord?.Message.react('♋')
|
||||
}*/ else if (bot.options.useChat) {
|
||||
|
||||
const length = context.bot.commandManager.commandlist.filter(c => c.trustLevel != 3).length
|
||||
bot.chat('&8Commands &3(&6' + JSON.stringify(length) + '&3) (&bPublic &f| &5Trusted &f| &4Owner&f)')
|
||||
await bot.chatDelay(100)
|
||||
bot.chat(`${pub_lick}`)
|
||||
await bot.chatDelay(100)
|
||||
bot.chat(`${t_rust}`)
|
||||
await bot.chatDelay(100)
|
||||
bot.chat(`${own_her}`)
|
||||
bot.console.info([cmd, 'Commands (', JSON.stringify(CommandManager.commandlist.length), ') ', category, ...pub_lick, t_rust, own_her, cons_ole], false)//[cmd, 'Commands (', length, ') ', category, ...pub_lick, t_rust, own_her, cons_ole]
|
||||
} else if (bot.options.useChat && !bot.options.isCreayun) {
|
||||
const length = context.bot.commandManager.commandlist.filter(c => c.trustLevel != 3).length
|
||||
bot.chat('&8Commands &3(&6' + JSON.stringify(length) + '&3) (&bPublic &f| &5Trusted &f| &4Owner&f)')
|
||||
await bot.chatDelay(200)
|
||||
bot.chat(`${bot.getMessageAsPrismarine(pub_lick)?.toMotd().replaceAll(',','')}`)
|
||||
await bot.chatDelay(200)
|
||||
bot.chat(`${bot.getMessageAsPrismarine(t_rust)?.toMotd().replaceAll(',','')}`)
|
||||
await bot.chatDelay(200)
|
||||
bot.chat(`${bot.getMessageAsPrismarine(own_her)?.toMotd().replaceAll(',','')}`)
|
||||
|
||||
|
||||
}else {
|
||||
} else if (bot.options.isCreayun) {
|
||||
const length = context.bot.commandManager.commandlist.filter(c => c.trustLevel != 3).length
|
||||
bot.chat('Please note that the bot will not output all commands due the char limit')
|
||||
await bot.chatDelay(1500)
|
||||
bot.chat('&8Commands &3(&6' + JSON.stringify(length) + '&3) (&bPublic &f| &5Trusted &f| &4Owner&f)')
|
||||
await bot.chatDelay(1500)
|
||||
bot.chat(`${bot.getMessageAsPrismarine(pub_lick)?.toMotd()?.replaceAll(',','')}`)
|
||||
await bot.chatDelay(1500)
|
||||
bot.chat(`${bot.getMessageAsPrismarine(t_rust)?.toMotd().replaceAll(',','')}`)
|
||||
await bot.chatDelay(1500)
|
||||
bot.chat(`${bot.getMessageAsPrismarine(own_her)?.toMotd().replaceAll(',','')}`)
|
||||
return
|
||||
} else {
|
||||
const length = context.bot.commandManager.commandlist.filter(c => c.trustLevel != 3).length
|
||||
/*
|
||||
bot.sendFeedback([
|
||||
@@ -300,7 +305,7 @@ category,
|
||||
t_rust
|
||||
,own_her],
|
||||
false)*/
|
||||
bot.sendFeedback([
|
||||
/*bot.tellraw([
|
||||
{ text:'Commands ',color:'dark_gray'},
|
||||
{ text:'(',color:'dark_blue'},
|
||||
{ text:`${JSON.stringify(CommandManager.commandlist.filter(c => c.trustLevel != 3 && c.trustLevel != -1).length)}`,color:'gold'},
|
||||
@@ -309,7 +314,17 @@ bot.sendFeedback([
|
||||
...pub_lick,
|
||||
t_rust,
|
||||
own_her,
|
||||
])
|
||||
])*/
|
||||
bot.tellraw([
|
||||
{ text:'Commands ',color:'dark_gray'},
|
||||
{ text:'(',color:'dark_blue'},
|
||||
{ text:`${JSON.stringify(CommandManager.commandlist.filter(c => c.trustLevel != 3 && c.trustLevel != -1).length)}`,color:'gold'},
|
||||
{ text:') ',color:'dark_blue'},
|
||||
category,
|
||||
...pub_lick,
|
||||
t_rust,
|
||||
own_her,
|
||||
])
|
||||
|
||||
}
|
||||
|
||||
@@ -337,14 +352,14 @@ const CommandManager = bot.commandManager
|
||||
bot?.discord?.Message?.reply({embeds: [Embed]})
|
||||
bot?.discord?.Message.react('♋')*/
|
||||
const Embed = new EmbedBuilder()
|
||||
.setColor('#00FFFF')
|
||||
.setColor(`${bot.Commands.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(`${command.name} info`)
|
||||
.addFields(
|
||||
// { name: '', value: `${bot.Discord.commandPrefix + command.name}` }
|
||||
{name: `${bot.Discord.commandPrefix}${command.name} (Aliases: ${command.aliases}) \u203a ${command.description}`, value: `\u200b`,inline:false},
|
||||
{name: `${bot.discord.commandPrefix}${command.name} (Aliases: ${command.aliases}) \u203a ${command.description}`, value: `\u200b`,inline:false},
|
||||
{ name: `Trust Level \u203a ${command.trustLevel}`,value:'\u200b'},
|
||||
{ name: `Usage \u203a ${bot.Discord.commandPrefix}${command.name} ${command.usage}`,value:'\u200b'},
|
||||
{ name: `Usage \u203a ${bot.discord.commandPrefix}${command.name} ${command.usage}`,value:'\u200b'},
|
||||
)
|
||||
bot?.discord?.Message?.reply({embeds: [Embed]})
|
||||
bot?.discord?.Message.react('♋')
|
||||
@@ -360,7 +375,7 @@ bot?.discord?.Message.react('♋')
|
||||
} else {
|
||||
const args = context.arguments
|
||||
|
||||
throw new CommandError(`Unknown command ${args[0]}. type "${bot.Discord.commandPrefix}" for help`)
|
||||
throw new CommandError(`Unknown command ${args[0]}. type "${bot.discord.commandPrefix}" for help`)
|
||||
|
||||
}
|
||||
const length = context.bot.commandManager.commandlist.length // ok
|
||||
@@ -397,7 +412,7 @@ throw new CommandError(`Unknown command ${args[0]}. type "${bot.Discord.commandP
|
||||
}
|
||||
|
||||
const Embed = new EmbedBuilder()
|
||||
.setColor('#00FFFF')
|
||||
.setColor(`${bot.Commands.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(`${bot.getMessageAsPrismarine(['Commands (',JSON.stringify(CommandManager.commandlist.filter(c => c.trustLevel != 3).length),')'])?.toString()}`)
|
||||
.addFields(
|
||||
|
||||
+190
-142
@@ -1,4 +1,4 @@
|
||||
const CommandError = require("../CommandModules/command_error");
|
||||
const CommandError = require("../util/command_error");
|
||||
const path = require("path");
|
||||
const fs = require("fs");
|
||||
const packageJSON = require("../../package.json");
|
||||
@@ -6,7 +6,8 @@ const os = require('os');
|
||||
const date = new Date().toLocaleDateString("en-US", {
|
||||
timeZone: "America/CHICAGO",
|
||||
});
|
||||
const { EmbedBuilder } = require('discord.js')
|
||||
const { execSync } = require('child_process');
|
||||
const { EmbedBuilder, ActionRowBuilder, ButtonBuilder, ButtonStyle } = require('discord.js')
|
||||
function format(seconds) {
|
||||
function pad(s) {
|
||||
return (s < 10 ? "0" : "") + s;
|
||||
@@ -29,7 +30,7 @@ module.exports = {
|
||||
"version",
|
||||
"invites",
|
||||
"server",
|
||||
"packages",
|
||||
"loaded",
|
||||
"login",
|
||||
"config",
|
||||
"uptime",
|
||||
@@ -38,158 +39,176 @@ module.exports = {
|
||||
async execute(context) {
|
||||
const bot = context.bot;
|
||||
const args = context.arguments;
|
||||
const source = context.source
|
||||
const source = context.source;
|
||||
const config = context.config;
|
||||
switch(args.join(' ').toLowerCase()) {
|
||||
case 'version':
|
||||
if (bot.options.useChat) {
|
||||
bot.chat(`${bot.getMessageAsPrismarine({text:`${process.env.buildstring}`})?.toMotd().replaceAll('§',"&")}`)
|
||||
if (bot.options.useChat && !bot.options.isCreayun) {
|
||||
bot.chat(bot.getMessageAsPrismarine({text:`${process.env.buildstring}-${execSync('git rev-parse HEAD').toString().slice(0, 10)}`})?.toMotd().replaceAll('§',"&"))
|
||||
await bot.chatDelay(100)
|
||||
bot.sendFeedback({text:`${process.env.FoundationBuildString}`})
|
||||
bot.sendFeedback({text:`${process.env.FoundationBuildString}-${execSync('git rev-parse HEAD').toString().slice(0, 10)}`})
|
||||
await bot.chatDelay(100)
|
||||
bot.sendFeedback({text:`11/22/2022 - ${date}`})
|
||||
bot.sendFeedback({text:`11/22/2022 - ${new Date().toLocaleDateString("en-US", { timeZone: "America/CHICAGO", })}`})
|
||||
} else if (bot.options.isCreayun) {
|
||||
bot.chat(bot.getMessageAsPrismarine(process.env.buildstring)?.toMotd().replaceAll('§','&'))
|
||||
await bot.chatDelay(1500)
|
||||
bot.chat(process.env.FoundationBuildString)
|
||||
await bot.chatDelay(1500)
|
||||
bot.chat(`11/22/2022 - ${new Date().toLocaleDateString("en-US", { timeZone: "America/CHICAGO", })}`)
|
||||
} else {
|
||||
bot.sendFeedback({text:`${process.env.buildstring}`})
|
||||
bot.sendFeedback({text:`${process.env.FoundationBuildString}`})
|
||||
bot.sendFeedback({text:`11/22/2022 - ${date}`})
|
||||
bot.sendFeedback({text:`${process.env.buildstring}-${execSync('git rev-parse HEAD').toString().slice(0, 10)}`})
|
||||
bot.sendFeedback({text:`${process.env.FoundationBuildString}-${execSync('git rev-parse HEAD').toString().slice(0, 10)}`})
|
||||
bot.sendFeedback({text:`11/22/2022 - ${new Date().toLocaleDateString("en-US", { timeZone: "America/CHICAGO", })}`})
|
||||
}
|
||||
break
|
||||
case 'invites':
|
||||
bot.sendFeedback({ text: 'Discord Invite', color: "dark_gray", translate: "", hoverEvent: { action: "show_text", value: [ { text: "click here to join!", color: "gray", }, ], }, clickEvent: { action: "open_url", value: `${bot.discord.invite}`, }, });
|
||||
bot.sendFeedback({ text: 'Matrix Invite', color: "dark_gray", translate: "", hoverEvent: { action: "show_text", value: [ { text: "click here to join!", color: "gray", }, ], }, clickEvent: { action: "open_url", value: `${bot.matrix.invite}`, }, });
|
||||
if (bot.options.isCreayun) {
|
||||
bot.chat(`Discord ${bot.discord.invite}`)
|
||||
await bot.chatDelay(1500)
|
||||
} else {
|
||||
bot.sendFeedback({ text: 'Discord Invite', color: "gray", translate: "", hoverEvent: { action: "show_text", value: [ { text: "click here to join!", color: "gray", }, ], }, clickEvent: { action: "open_url", value: `${bot.discord.invite}`, }, });
|
||||
}
|
||||
break
|
||||
case 'server':
|
||||
if (bot.options.useChat) {
|
||||
bot.sendFeedback({ color: "dark_gray", text: `Hostname \u203a ${os.hostname()}`, })
|
||||
if (bot.options.useChat && !bot.options.isCreayun) {
|
||||
bot.sendFeedback({ color: "gray", text: `Hostname \u203a ${os.hostname()}`, })
|
||||
await bot.chatDelay(100)
|
||||
bot.sendFeedback({ color: "dark_gray", text: `Working Directory \u203a ${process.mainModule.path}`, });
|
||||
bot.sendFeedback({ color: "gray", text: `Working Directory \u203a ${process.mainModule.path}`, });
|
||||
await bot.chatDelay(100)
|
||||
bot.sendFeedback({ color: "dark_gray", text: `${os.arch()}`})
|
||||
bot.sendFeedback({ color: "gray", text: `${os.arch()}`})
|
||||
await bot.chatDelay(100)
|
||||
bot.sendFeedback({ color: "dark_gray", text:`OS \u203a ${os.platform()}`})
|
||||
bot.sendFeedback({ color: "gray", text:`OS \u203a ${os.platform()}`})
|
||||
await bot.chatDelay(100)
|
||||
bot.sendFeedback({ color: "dark_gray", text: `OS Version/distro \u203a ${os.version()}`, });
|
||||
bot.sendFeedback({ color: "gray", text: `OS Version/distro \u203a ${os.version()}`, });
|
||||
await bot.chatDelay(100)
|
||||
bot.sendFeedback({ color: "dark_gray", text: `Kernal Version \u203a ${os.release()}`, });
|
||||
bot.sendFeedback({ color: "gray", text: `Kernal Version \u203a ${os.release()}`, });
|
||||
await bot.chatDelay(100)
|
||||
bot.sendFeedback({ color: "dark_gray", text: `cores \u203a ${os.cpus().length}`, });
|
||||
bot.sendFeedback({ color: "gray", text: `cores \u203a ${os.cpus().length}`, });
|
||||
await bot.chatDelay(100)
|
||||
bot.sendFeedback({ color: "dark_gray", text: `CPU \u203a ${os.cpus()[0].model}`, });
|
||||
bot.sendFeedback({ color: "gray", text: `CPU \u203a ${os.cpus()[0].model}`, });
|
||||
await bot.chatDelay(100)
|
||||
bot.sendFeedback([{text:`Server Free memory `, color:'dark_gray'},{text:`${Math.floor( os.freemem() / 1048576, )} `,color:'dark_gray'},{text: `MiB / ${Math.floor(os.totalmem() / 1048576)} MiB`, color:'dark_gray'}]);
|
||||
bot.sendFeedback([{text:`Server Free memory `, color:'gray'},{text:`${Math.floor( os.freemem() / 1048576, )} `,color:'gray'},{text: `MiB / ${Math.floor(os.totalmem() / 1048576)} MiB`, color:'gray'}]);
|
||||
await bot.chatDelay(100)
|
||||
bot.sendFeedback({text:`Device uptime \u203a ${format(os.uptime())}`,color:'dark_gray'})
|
||||
bot.sendFeedback({text:`Device uptime \u203a ${format(os.uptime())}`,color:'gray'})
|
||||
await bot.chatDelay(100)
|
||||
bot.sendFeedback({text:`Node version \u203a ${process.version}`,color:'dark_gray'})
|
||||
bot.sendFeedback({text:`Node version \u203a ${process.version}`,color:'gray'})
|
||||
} else if (bot.options.isCreayun) {
|
||||
bot.chat(`Host \u203a ${os.hostname()}`)
|
||||
await bot.chatDelay(1500)
|
||||
bot.chat(`Working Dir \u203a ${process.mainModule.path}`)
|
||||
await bot.chatDelay(1500)
|
||||
bot.chat(`${os.arch}`)
|
||||
await bot.chatDelay(1500)
|
||||
bot.chat(`OS \u203a ${os.platform()}`)
|
||||
await bot.chatDelay(1500)
|
||||
bot.chat(`OS Version \u203a ${os.version()}`)
|
||||
await bot.chatDelay(1500)
|
||||
bot.chat(`Kernal Version \u203a ${os.release()}`)
|
||||
await bot.chatDelay(1500)
|
||||
bot.chat(`cores \u203a ${os.cpus().length}`)
|
||||
await bot.chatDelay(1500)
|
||||
bot.chat(`CPU \u203a ${os.cpus()[0].model}`)
|
||||
await bot.chatDelay(1500)
|
||||
bot.chatDelay(`too lazy to put server free memory here rn`)
|
||||
await bot.chatDelay(1500)
|
||||
bot.chat(`Device uptime \u203a ${format(os.uptime())}`)
|
||||
await bot.chatDelay(1500)
|
||||
bot.chat(`Node version \u203a ${process.version}`)
|
||||
} else {
|
||||
bot.sendFeedback({ color: "dark_gray", text: `Hostname \u203a ${os.hostname()}`, });
|
||||
bot.sendFeedback({ color: "dark_gray", text: `Working Directory \u203a ${process.mainModule.path}`, });
|
||||
bot.sendFeedback({ color: "dark_gray", text: `${os.arch()}`})
|
||||
bot.sendFeedback({ color: "dark_gray", text:`OS \u203a ${os.platform()}`})
|
||||
bot.sendFeedback({ color: "dark_gray", text: `OS Version/distro \u203a ${os.version()}`, });
|
||||
bot.sendFeedback({ color: "dark_gray", text: `Kernal Version \u203a ${os.release()}`, });
|
||||
bot.sendFeedback({ color: "dark_gray", text: `cores \u203a ${os.cpus().length}`, });
|
||||
bot.sendFeedback({ color: "dark_gray", text: `CPU \u203a ${os.cpus()[0].model}`, });
|
||||
bot.sendFeedback([{text:`Server Free memory `, color:'dark_gray'},{text:`${Math.floor( os.freemem() / 1048576, )} `,color:'dark_gray'},{text: `MiB / ${Math.floor(os.totalmem() / 1048576)} MiB`, color:'dark_gray'}]);
|
||||
bot.sendFeedback({text:`Device uptime \u203a ${format(os.uptime())}`,color:'dark_gray'})
|
||||
bot.sendFeedback({text:`Node version \u203a ${process.version}`,color:'dark_gray'})
|
||||
bot.sendFeedback({ color: "gray", text: `Hostname \u203a ${os.hostname()}`, });
|
||||
bot.sendFeedback({ color: "gray", text: `Working Directory \u203a ${process.mainModule.path}`, });
|
||||
bot.sendFeedback({ color: "gray", text: `${os.arch()}`})
|
||||
bot.sendFeedback({ color: "gray", text:`OS \u203a ${os.platform()}`})
|
||||
bot.sendFeedback({ color: "gray", text: `OS Version/distro \u203a ${os.version()}`, });
|
||||
bot.sendFeedback({ color: "gray", text: `Kernal Version \u203a ${os.release()}`, });
|
||||
bot.sendFeedback({ color: "gray", text: `cores \u203a ${os.cpus().length}`, });
|
||||
bot.sendFeedback({ color: "gray", text: `CPU \u203a ${os.cpus()[0].model}`, });
|
||||
bot.sendFeedback([{text:`Server Free memory `, color:'gray'},{text:`${Math.floor( os.freemem() / 1048576, )} `,color:'gray'},{text: `MiB / ${Math.floor(os.totalmem() / 1048576)} MiB`, color:'gray'}]);
|
||||
bot.sendFeedback({text:`Device uptime \u203a ${format(os.uptime())}`,color:'gray'})
|
||||
bot.sendFeedback({text:`Node version \u203a ${process.version}`,color:'gray'})
|
||||
}
|
||||
break
|
||||
case 'loaded':
|
||||
let src = fs.readdirSync('./src/').filter(f => path.extname(f).toLowerCase() === '.js').length;
|
||||
let util = fs.readdirSync('./src/util/').filter(f => path.extname(f).toLowerCase() === '.js').length;
|
||||
let utilJSON = fs.readdirSync('./src/util/').filter(f => path.extname(f).toLowerCase() === '.json').length;
|
||||
let language = fs.readdirSync('./src/util/language').filter(f => path.extname(f).toLowerCase() === '.json').length;
|
||||
let music = fs.readdirSync('./src/util/music').filter(f => path.extname(f).toLowerCase() === '.js').length;
|
||||
let convertor = fs.readdirSync('./src/util/music/midi_converter').filter(f => path.extname(f).toLowerCase() === '.js').length;
|
||||
let convertorJSON = fs.readdirSync('./src/util/music/midi_converter').filter(f => path.extname(f).toLowerCase() === '.json').length
|
||||
let modules = fs.readdirSync('./src/modules').filter(f => path.extname(f).toLowerCase() === '.js').length;
|
||||
let commands = fs.readdirSync('./src/commands').filter(f => path.extname(f).toLowerCase() === '.js').length;
|
||||
let chat = fs.readdirSync('./src/chat').filter(f => path.extname(f).toLowerCase() === '.js').length;
|
||||
let CommandModules = fs.readdirSync('./src/CommandModules').filter(f => path.extname(f).toLowerCase() === '.js').length;
|
||||
let FileCount = `${src + util + utilJSON + language + music + convertor + convertorJSON + modules + commands + chat + CommandModules}`
|
||||
|
||||
|
||||
// lazy file count :shrug:
|
||||
// source.sendFeedback([{text:'Package Count \u203a ',color:'dark_gray'},{text:`${Object.keys(packageJSON.dependencies).length}`,color:'gold'}])
|
||||
if (bot.options.useChat) {
|
||||
bot.sendFeedback([{text:'Package Count \u203a ', color:'dark_gray'},{text:`${Object.keys(packageJSON.dependencies).length}`,color:'gold'}])
|
||||
} else {
|
||||
// bot.sendFeedback([{text:'Packages \u203a ',color:'dark_gray'},{text:`${Object.entries(packageJSON.dependencies).map((key, value) => key + ' ' + value).join(' ')}`}])
|
||||
bot.sendFeedback([{text:'Package Count \u203a ', color:'dark_gray'},{text:`${Object.keys(packageJSON.dependencies).length}`,color:'gold'}])
|
||||
bot.sendFeedback([{text:'File count ',color:'dark_gray'},{text:'(',color:'dark_blue'},{text:`${FileCount}`,color:'gold'},{text:')',color:'dark_blue'}])
|
||||
// source.sendFeedback([{text:'Package Count \u203a ',color:'gray'},{text:`${Object.keys(packageJSON.dependencies).length}`,color:'gold'}])
|
||||
if (bot.options.useChat && !bot.options.isCreayun) {
|
||||
bot.sendFeedback([{text:'Package Count \u203a ', color:'gray'},{text:`${Object.keys(packageJSON.dependencies).length}`,color:'gold'}])
|
||||
} else if (bot.options.isCreayun) {
|
||||
bot.chat(`Package Count \u203a ${Object.keys(packageJSON.dependencies).length}`)
|
||||
await bot.chatDelay(1500)
|
||||
bot.chat(`File Could \u203a (${JSON.stringify(FileCount)})`)
|
||||
} else {
|
||||
|
||||
bot.sendFeedback([{text:'Package Count \u203a ', color:'gray'},{text:`${Object.keys(packageJSON.dependencies).length}`,color:'gold'}])
|
||||
}
|
||||
break
|
||||
case 'time':
|
||||
if (bot.options.isCreayun) {
|
||||
bot.chat(`the bot is reading ${new Date().toLocaleTimeString("en-US", { timeZone: "America/CHICAGO", })}`)
|
||||
} else {
|
||||
bot.sendFeedback([{text:`the bot is reading ${new Date().toLocaleTimeString("en-US", { timeZone: "America/CHICAGO", })}`}])
|
||||
}
|
||||
break
|
||||
case 'login':
|
||||
if (bot.options.useChat) {
|
||||
bot.sendFeedback({text:`Minecraft Username \u203a ${bot.options.username}`,color:'dark_gray'})
|
||||
bot.sendFeedback({text:`Minecraft Username \u203a ${bot.options.username}`,color:'gray'})
|
||||
await bot.chatDelay(150)
|
||||
bot.sendFeedback({text: `uuid \u203a ${bot.uuid}`,color:'dark_gray'})
|
||||
bot.sendFeedback({text: `uuid \u203a ${bot.uuid}`,color:'gray'})
|
||||
await bot.chatDelay(150)
|
||||
/*if(bot.discord === undefined){
|
||||
bot.sendFeedback({text:'Currently not logged into discord',color:'dark_red'})
|
||||
await bot.chatDelay(150)
|
||||
}else{
|
||||
bot.sendFeedback({text:`Discord Username \u203a ${bot.discord.client.user.username + '#' + bot.discord.client.user.discriminator}`,color:'dark_gray'})
|
||||
bot.sendFeedback({text:`Discord Username \u203a ${bot.discord.client.user.username + '#' + bot.discord.client.user.discriminator}`,color:'gray'})
|
||||
await bot.chatDelay(150)
|
||||
} */
|
||||
await bot.chatDelay(150)
|
||||
/*if (bot.matrix.client === undefined){
|
||||
bot.sendFeedback({text:'Currently not logged into matrix',color:'dark_red'})
|
||||
}else{
|
||||
bot.sendFeedback({text: `Matrix Username \u203a ${bot.matrix.client.credentials.userId}`,color:'dark_gray'})
|
||||
}*/
|
||||
await bot.chatDelay(150)
|
||||
bot.sendFeedback({text:`Server \u203a ${bot.options.serverName}`,color:'dark_gray'})
|
||||
bot.sendFeedback({text:`Server \u203a ${bot.options.serverName}`,color:'gray'})
|
||||
await bot.chatDelay(150)
|
||||
bot.sendFeedback({text:`Server IP \u203a ${bot.options.host + ':' + bot.options.port}`,color:'dark_gray'})
|
||||
bot.sendFeedback({text:`Server IP \u203a ${bot.options.host + ':' + bot.options.port}`,color:'gray'})
|
||||
await bot.chatDelay(150)
|
||||
source.sendFeedback({text:`Version \u203a ${bot.options.version}`,color:'dark_gray'})
|
||||
source.sendFeedback({text:`Version \u203a ${bot.options.version}`,color:'gray'})
|
||||
} else {
|
||||
bot.sendFeedback({text:`Minecraft Username \u203a ${bot.options.username}`,color:'dark_gray'})
|
||||
bot.sendFeedback({text: `uuid \u203a ${bot.uuid}`,color:'dark_gray'})
|
||||
if(bot.discord === undefined){
|
||||
bot.sendFeedback({text:'Currently not logged into discord',color:'dark_red'})
|
||||
}else{
|
||||
bot.sendFeedback({text:`Discord Username \u203a ${bot.discord.client.user.username + '#' + bot.discord.client.user.discriminator}`,color:'dark_gray'})
|
||||
}
|
||||
if (bot.matrix.client === undefined){
|
||||
bot.sendFeedback({text:'Currently not logged into matrix',color:'dark_red'})
|
||||
}else{
|
||||
bot.sendFeedback({text: `Matrix Username \u203a ${bot.matrix.client.credentials.userId}`,color:'dark_gray'})
|
||||
}
|
||||
bot.sendFeedback({text:`Server \u203a ${bot.options.serverName}`,color:'dark_gray'})
|
||||
bot.sendFeedback({text:`Server IP \u203a ${bot.options.host + ':' + bot.options.port}`,color:'dark_gray'})
|
||||
bot.sendFeedback({text:`Version \u203a ${bot.options.version}`,color:'dark_gray'})
|
||||
bot.sendFeedback({text:`Discord channel \u203a ${bot.discord.channel.name}`,color:'dark_gray'})
|
||||
bot.sendFeedback({text:`Minecraft Username \u203a ${bot.options.username}`,color:'gray'})
|
||||
bot.sendFeedback({text: `uuid \u203a ${bot.uuid}`,color:'gray'})
|
||||
bot.sendFeedback({text:`Server \u203a ${bot.options.serverName}`,color:'gray'})
|
||||
bot.sendFeedback({text:`Server IP \u203a ${bot.options.host + ':' + bot.options.port}`,color:'gray'})
|
||||
bot.sendFeedback({text:`Version \u203a ${bot.options.version}`,color:'gray'})
|
||||
bot.sendFeedback({text:`Discord channel \u203a ${bot.discord.channel.name}`,color:'gray'})
|
||||
bot.sendFeedback({text:`Discord Username \u203a ${bot.discord.client.user.username + '#' + bot.discord.client.user.discriminator}`,color:'gray'})
|
||||
}
|
||||
break
|
||||
case 'config':
|
||||
if (bot.options.useChat) {
|
||||
bot.sendFeedback({text:`Prefixes \u203a ${bot.Commands.prefixes}`,color:'dark_gray'})
|
||||
bot.sendFeedback({text:`Prefixes \u203a ${config.Commands.prefixes}`,color:'gray'})
|
||||
await bot.chatDelay(100)
|
||||
bot.sendFeedback([{text:`Core enabled? `,color:'dark_gray'},{text:`${bot.options.Core.enabled}`,color:'gold'}])
|
||||
bot.sendFeedback([{text:`Core enabled? `,color:'gray'},{text:`${bot.options.Core.enabled}`,color:'gold'}])
|
||||
await bot.chatDelay(100)
|
||||
//bot.sendFeedback([{text:'Discord enabled? ',color:'dark_gray'},{text:`${bot.Discord.enabled}`,color:'gold'}])
|
||||
//bot.sendFeedback([{text:'Discord enabled? ',color:'gray'},{text:`${bot.Discord.enabled}`,color:'gold'}])
|
||||
await bot.chatDelay(100)
|
||||
//bot.sendFeedback([{text:'Matrix enabled? ',color:'dark_gray'},{text:`${bot.matrix.enabled}`,color:'gold'}])
|
||||
bot.sendFeedback([{text:'Console logging enabled? ',color:'gray'},{text:`${bot.options.Console.enabled}`,color:'gold'}])
|
||||
await bot.chatDelay(100)
|
||||
bot.sendFeedback([{text:'Console logging enabled? ',color:'dark_gray'},{text:`${bot.options.Console.enabled}`,color:'gold'}])
|
||||
bot.sendFeedback([{text:'Chat filelogging enabled? ',color:'gray'},{text:`${config.console.filelogging}`,color:'gold'}])
|
||||
await bot.chatDelay(100)
|
||||
bot.sendFeedback([{text:'Chat filelogging enabled? ',color:'dark_gray'},{text:`${bot.Console.filelogging}`,color:'gold'}])
|
||||
await bot.chatDelay(100)
|
||||
bot.sendFeedback([{text:'Multiconnect Server count \u203a ',color:'dark_gray'},{text:`${Object.keys(bot.bots).length}`,color:'gold'}])
|
||||
bot.sendFeedback([{text:'Multiconnect Server count \u203a ',color:'gray'},{text:`${Object.keys(bot.bots).length}`,color:'gold'}])
|
||||
} else {
|
||||
bot.sendFeedback({text:`Prefixes \u203a ${bot.Commands.prefixes}`,color:'dark_gray'})
|
||||
bot.sendFeedback([{text:`Core enabled? `,color:'dark_gray'},{text:`${bot.options.Core.enabled}`,color:'gold'}])
|
||||
bot.sendFeedback([{text:'Discord enabled? ',color:'dark_gray'},{text:`${bot.Discord.enabled}`,color:'gold'}])
|
||||
bot.sendFeedback([{text:'Matrix enabled? ',color:'dark_gray'},{text:`${bot.matrix.enabled}`,color:'gold'}])
|
||||
bot.sendFeedback([{text:'Console logging enabled? ',color:'dark_gray'},{text:`${bot.options.Console.enabled}`,color:'gold'}])
|
||||
bot.sendFeedback([{text:'Chat filelogging enabled? ',color:'dark_gray'},{text:`${bot.Console.filelogging}`,color:'gold'}])
|
||||
bot.sendFeedback([{text:'Multiconnect Server count \u203a ',color:'dark_gray'},{text:`${Object.keys(bot.bots).length}`,color:'gold'}])
|
||||
bot.sendFeedback({text:`Prefixes \u203a ${config.Commands.prefixes}`,color:'gray'})
|
||||
bot.sendFeedback([{text:`Core enabled? `,color:'gray'},{text:`${bot.options.Core.enabled}`,color:'gold'}])
|
||||
// bot.sendFeedback([{text:'Discord enabled? ',color:'gray'},{text:`${bot.Discord.enabled}`,color:'gold'}])
|
||||
bot.sendFeedback([{text:'Console logging enabled? ',color:'gray'},{text:`${bot.options.Console.enabled}`,color:'gold'}])
|
||||
bot.sendFeedback([{text:'Chat filelogging enabled? ',color:'gray'},{text:`${config.console.filelogging}`,color:'gold'}])
|
||||
bot.sendFeedback([{text:'Multiconnect Server count \u203a ',color:'gray'},{text:`${Object.keys(bot.bots).length}`,color:'gold'}])
|
||||
bot.sendFeedback([{text:'Discord enabled? ',color:'gray'},{text:`${bot.Discord.enabled}`,color:'gold'}])
|
||||
}
|
||||
break
|
||||
case 'uptime':
|
||||
bot.sendFeedback([{text:`${format(process.uptime())}`,color:'dark_gray'}])
|
||||
if (bot.options.isCreayun) {
|
||||
bot.chat(`${format(process.uptime())}`)
|
||||
} else {
|
||||
bot.sendFeedback([{text:`${format(process.uptime())}`,color:'gray'}])
|
||||
}
|
||||
break
|
||||
case 'contributors':
|
||||
if (bot.options.useChat) {
|
||||
@@ -207,7 +226,7 @@ bot.chat('&aMorganAnkan')
|
||||
await bot.chatDelay(100)
|
||||
bot.chat('&2TurtleKid')
|
||||
} else {
|
||||
bot.sendFeedback({ translate: "%s%s", with: [ { color: "dark_red", text: "Parker" }, { color: "black", text: "2991" }, ], hoverEvent: { action: "show_text", value: [ { text: "FNF", color: "dark_purple", bold: true, }, { text: "Boyfriend", color: "aqua", bold: true, }, { text: "Bot ", color: "dark_red", bold: true, }, { text: "Discord", color: "blue", bold: false, }, ], }, clickEvent: { action: "open_url", value: `${bot.Discord.invite}`, }, });
|
||||
bot.sendFeedback({ translate: "%s%s", with: [ { color: "dark_red", text: "Parker" }, { color: "black", text: "2991" }, ], hoverEvent: { action: "show_text", value: [ { text: "FNF", color: "dark_purple", bold: true, }, { text: "Boyfriend", color: "aqua", bold: true, }, { text: "Bot ", color: "dark_red", bold: true, }, { text: "Discord", color: "blue", bold: false, }, ], }, clickEvent: { action: "open_url", value: `${bot.discord.invite}`, }, });
|
||||
bot.sendFeedback({ text: "_ChipMC_", color: "dark_green", translate: "", hoverEvent: { action: "show_text", value: [ { text: "chipmunk dot land", color: "green", }, ], }, clickEvent: { action: "open_url", value: `https://chipmunk.land`, }, });
|
||||
bot.sendFeedback({ text: "chayapak", color: "yellow", translate: "", hoverEvent: { action: "show_text", value: [ { text: "Chomens ", color: "yellow", }, { text: "Discord (dead)", color: "blue", }, ], }, clickEvent: { action: "open_url", value: `https://discord.gg/xdgCkUyaA4`, }, });
|
||||
bot.sendFeedback({ text: "_yfd", color: "light_purple", translate: "", hoverEvent: { action: "show_text", value: [ { text: "ABot ", color: "gold", bold: true, }, { text: "Discord (gone)", color: "blue", bold: false, }, ], }, clickEvent: { action: "open_url", value: `https://discord.gg/CRfP2ZbG8T`, }, });
|
||||
@@ -221,8 +240,12 @@ var prefix = "&8&l&m[&4&mParker2991&8]&8&m[&b&mBOYFRIEND&8]&8&m[&b&mCONSOLE&8]&r
|
||||
bot.core.run( "bcraw " + prefix + "Thank you for all that helped and contributed with the bot, it has been one hell of a ride with the bot hasnt it? From November 22, 2022 to now, 0.1 beta to 4.0 alpha, Mineflayer to Node-Minecraft-Protocol. I have enjoyed all the new people i have met throughout the development of the bot back to the days when the bot used mineflayer for most of its lifespan to the present as it now uses node-minecraft-protocol. Its about time for me to tell how development went in the bot well here it is, back in 0.1 beta of the bot it was skidded off of menbot 1.0 reason why? Well because LoginTimedout gave me the bot when ayunboom was still a thing and he helped throughout that time period bot and when 1.0 beta came around he he just stopped helping me on it why? because he had servers to run so yeah but anyway back then i didnt know what skidded like i do now so i thought i could get away with but i was wrong 💀. Early names considered for the bot were &6&lParkerBot &4&lDEMONBot &b&lWoomyBot &b&lBoyfriendBot,&r i kept the name &b&lBoyfriendBot&r throughout most of the early development but i got sick and tired of being harassed about the name being told it was gay but people really didnt know what it meant did they? It was referenced to Boyfriend from Friday Night Funkin’ so right around 1.0 released i renamed it to &b&lFNFBoyfriend&4&lBot &rand around 2.0 changed it to &5&lFNF&b&lBoyfriend&4&lBot &rand luckily avoided the harassment when i changed it i love coding and i want to learn how to code more thank you all!",)
|
||||
break
|
||||
default:
|
||||
if (bot.options.isCreayun) {
|
||||
bot.chat(`&4Invalid argument`)
|
||||
} else {
|
||||
bot.sendError({text:'Invalid Argument!!'})
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
discordExecute(context) {
|
||||
@@ -230,60 +253,85 @@ const bot = context.bot
|
||||
const source = context.source
|
||||
const args = context.arguments
|
||||
switch(args.join(' ').toLowerCase()) {
|
||||
/*
|
||||
const Embed = new EmbedBuilder()
|
||||
.setColor('#00FFFF')
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(`${bot.getMessageAsPrismarine({ text: util.inspect(eval(args.slice(0).join(' ')), { stylize }) })?.toString()}`)
|
||||
bot.discord.Message.reply({embeds: [Embed]})
|
||||
*/
|
||||
case 'version':
|
||||
var Embed = new EmbedBuilder()
|
||||
.setColor('#00FFFF')
|
||||
case 'version':
|
||||
let Embed = new EmbedBuilder()
|
||||
.setColor(`${configCommands.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription('\u200b')
|
||||
.addFields(
|
||||
{name:`${process.env.buildstring}`,value:'\u200b'},
|
||||
{name:`${process.env.buildstring}-${execSync('git rev-parse HEAD').toString().slice(0, 10)}`,value:'\u200b'},
|
||||
{name:`${process.env.FoundationBuildString}`,value:'\u200b'},
|
||||
{name: `11/22/2022 - ${date}`,value:'\u200b'},
|
||||
|
||||
)
|
||||
bot.discord.Message.reply({embeds: [Embed]})
|
||||
break
|
||||
case 'invites':
|
||||
var Embed = new EmbedBuilder()
|
||||
.setColor('#00FFFF')
|
||||
bot.discord.Message.reply({embeds: [Embed]})
|
||||
break
|
||||
case 'invites':
|
||||
try {
|
||||
let inviteEmbed = new EmbedBuilder()
|
||||
.setColor(`${config.Commands.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription('Discord Invite ↓↓↓')
|
||||
let inviteButton = new ButtonBuilder()
|
||||
.setLabel('Discord Invite')
|
||||
.setURL(`${bot.discord.invite}`)
|
||||
.setStyle(ButtonStyle.Link);
|
||||
let row = new ActionRowBuilder()
|
||||
.addComponents(inviteButton);
|
||||
|
||||
bot.discord.Message.reply({embeds: [inviteEmbed], components: [row]})
|
||||
} catch (e) {
|
||||
bot.discord.Message.reply(`${e.stack}`)
|
||||
}
|
||||
// bot.discord.channel.send({embeds: [inviteButton]})
|
||||
break
|
||||
case 'server':
|
||||
bot.discord.Message.reply(`Hostname \u203a ${os.hostname()}\nWorking Directory \u203a ${process.mainModule.path}\nOS \u203a ${os.platform()}\nKernal Version \u203a ${os.release()}\ncores \u203a ${os.cpus().length}\nCPU \u203a ${os.cpus()[0].model}\nServer Free memory ${Math.floor( os.freemem() / 1048576 )} MiB / ${Math.floor(os.totalmem() / 1048576)} MiB\nDevice uptime \u203a ${format(os.uptime())}\nNode version \u203a ${process.version}`)
|
||||
|
||||
|
||||
break
|
||||
case 'loaded':
|
||||
let packages = Object.entries(packageJSON.dependencies).map((key, value) => key + ' ' + value).join(' ')
|
||||
let Embed2 = new EmbedBuilder()
|
||||
.setColor(`${config.Commands.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription('\u200b')
|
||||
.addFields(
|
||||
{name:`${bot.Discord.invite}`,value:'\u200b'},
|
||||
{name:`${bot.matrix.invite}`,value:'\u200b'},
|
||||
{ name: `Package Count \u203a ${Object.keys(packageJSON.dependencies).length}`, value: '\u200b' },
|
||||
)
|
||||
bot.discord.Message.reply({embeds: [Embed]})
|
||||
break
|
||||
case 'server':
|
||||
bot.discord.Message.reply(`Hostname \u203a ${os.hostname()}\nWorking Directory \u203a ${process.mainModule.path}\nOS \u203a ${os.platform()}\nKernal Version \u203a ${os.release()}\ncores \u203a ${os.cpus().length}\nCPU \u203a ${os.cpus()[0].model}\nServer Free memory ${Math.floor( os.freemem() / 1048576 )} MiB / ${Math.floor(os.totalmem() / 1048576)} MiB\nDevice uptime \u203a ${format(os.uptime())}\nNode version \u203a ${process.version}`)
|
||||
|
||||
|
||||
break
|
||||
case 'packages':
|
||||
let packages = Object.entries(packageJSON.dependencies).map((key, value) => key + ' ' + value).join(' ')
|
||||
var Embed = new EmbedBuilder()
|
||||
.setColor('#00FFFF')
|
||||
bot.discord.Message.reply({ embeds: [Embed2] })
|
||||
break
|
||||
case 'login':
|
||||
let Embed3 = new EmbedBuilder()
|
||||
.setColor(`${config.Commands.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription('\u200b')
|
||||
.addFields(
|
||||
{name:`Packages \u203a ${JSON.stringify(packages)}`,value:'\u200b'},
|
||||
{name:`Package Count \u203a ${Object.keys(packageJSON.dependencies).length}`,value:'\u200b'},
|
||||
)
|
||||
bot.discord.Message.reply({embeds: [Embed]})
|
||||
break
|
||||
/*
|
||||
case 'packages':
|
||||
// source.sendFeedback([{text:'Package Count \u203a ',color:'dark_gray'},{text:`${Object.keys(packageJSON.dependencies).length}`,color:'gold'}])
|
||||
bot.sendFeedback([{text:'Packages \u203a ',color:'dark_gray'},{text:`${Object.entries(packageJSON.dependencies).map((key, value) => key + ' ' + value).join(' ')}`}])
|
||||
bot.sendFeedback([{text:'Package Count \u203a ', color:'dark_gray'},{text:`${Object.keys(packageJSON.dependencies).length}`,color:'gold'}])
|
||||
*/
|
||||
.setDescription(`Server ${bot.options.serverName}\nIP ${bot.options.host}\nVersion ${bot.options.version}\nMinecraft Username ${bot.options.username}\nUUID ${bot._client.uuid}\nDiscord Username ${bot.discord.client.user.username}'#'${bot.discord.client.user.discriminator}\nDiscord Channel ${bot.discord.channel.name}`)
|
||||
|
||||
bot.discord.Message.reply({ embeds: [Embed3] })
|
||||
break
|
||||
case 'config':
|
||||
let Embed4 = new EmbedBuilder()
|
||||
.setColor(`${config.Commands.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(`Prefixes ${bot.Commands.prefixes}\nCore Enabled? ${bot.options.Core.enabled}\nConsole logging enabled? ${bot.options.Console.enabled}\nChat filelogging enabled? ${bot.Console.filelogging}\nMulticonnect Server count ${(bot.bots).length}`)
|
||||
bot.discord.Message.reply({ embeds: [Embed4] })
|
||||
break
|
||||
case 'uptime':
|
||||
let Embed5 = new EmbedBuilder()
|
||||
.setColor(`${config.Commands.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(`${format(process.uptime())}`)
|
||||
bot.discord.Message.reply({ embeds: [Embed5] })
|
||||
break
|
||||
case 'contributors':
|
||||
let Embed6 = new EmbedBuilder()
|
||||
.setColor(`${config.Commands.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(`Parker2991\n_ChipMC_\nchayapak\n_yfd\naaa\nMorganAnkan\nTurtleKid`)
|
||||
bot.discord.Message.reply({ embeds: [Embed6] })
|
||||
break
|
||||
default:
|
||||
throw new CommandError(bot.getMessageAsPrismarine({ translate: "command.unknown.argument" })?.toMotd())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,51 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
const timer = null
|
||||
|
||||
module.exports = {
|
||||
name: 'kick',
|
||||
|
||||
description: ['kicks a player'],
|
||||
|
||||
trustLevel: 1,
|
||||
aliases: [],
|
||||
usage: ['sussy <player>', 'invalidstring <player>'],
|
||||
execute (context) {
|
||||
// throw new CommandError('temp disabled')
|
||||
// throw new CommandError('command temporarily disabled until hashing is implemented')
|
||||
const args = context.arguments
|
||||
const bot = context.bot
|
||||
if (!args && !args[0] && !args[1] && !args[2]) return
|
||||
switch (args[1]) {
|
||||
case 'sussy':
|
||||
if (args[2] === 'clear' || args[2] === 'stop') {
|
||||
clearInterval(this.timer)
|
||||
this.timer = null
|
||||
|
||||
bot.sendFeedback('Cloop Stopped', false)
|
||||
return
|
||||
}
|
||||
|
||||
// if (this.timer !== null) throw new CommandError('The bot can currently only loop one command')
|
||||
// anti fard
|
||||
|
||||
const target = context.player// let me hashonly it rq
|
||||
this.timer = setInterval(function () { // Wait, is this command public?
|
||||
repeat(context.bot, 400, `tellraw ${args[2]} {"text":"${'ඞ'.repeat(20000)}","bold":true,"italic":true,"obfuscated":true,"color":"#FF0000"}`)
|
||||
}, 10)
|
||||
|
||||
// i found that there is a limit
|
||||
|
||||
// Repeat the command over and over.
|
||||
function repeat (bot, repetitions, cmd) {
|
||||
for (let i = 0; i < repetitions; i++) {
|
||||
bot.core.run(cmd)
|
||||
}
|
||||
}
|
||||
break
|
||||
case 'invalidstring':
|
||||
bot.core.run(`minecraft:tellraw ${args[2]} ${process.env.invalidstring}`)
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
const CommandError = require('../util/command_error')
|
||||
module.exports = {
|
||||
name: 'kill',
|
||||
description:['kills the bots process'],
|
||||
trustLevel: 3,
|
||||
aliases:['stop','kill','suicide'],
|
||||
usage:[""],
|
||||
async execute (context) {
|
||||
const bot = context.bot
|
||||
const message = context.arguments.join(' ')
|
||||
const args = context.arguments
|
||||
const source = context.source
|
||||
bot.sendFeedback(`${bot.username} fell out of the world`)
|
||||
process.exit(69)
|
||||
},
|
||||
async discordExecute (context) {
|
||||
const bot = context.bot;
|
||||
bot.discord.Message.reply('suiciding,..')
|
||||
process.exit(69)
|
||||
}
|
||||
}
|
||||
/*context.source.sendFeedback('farding right now....')
|
||||
process.exit(1)
|
||||
*/
|
||||
@@ -1,4 +1,4 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
const CommandError = require('../util/command_error')
|
||||
const { EmbedBuilder } = require('discord.js')
|
||||
module.exports = {
|
||||
name: 'list',
|
||||
@@ -17,7 +17,9 @@ const source = context.source
|
||||
throw new CommandError({translate:"Too many Arguments!", color:"red"})
|
||||
}
|
||||
|
||||
|
||||
if (bot.options.isCreayun) {
|
||||
bot.chat('&4Cannot execute command because isCreayun is active in the config!')
|
||||
} else {
|
||||
for (const player of players) {
|
||||
component.push({
|
||||
translate: `%s \u203a %s [%s %s %s %s %s]`,
|
||||
@@ -78,6 +80,7 @@ bot.tellraw([{text:`Players: `,color:'dark_gray',},{text:'(',color:'blue'},{text
|
||||
bot.tellraw(component)
|
||||
|
||||
}
|
||||
}
|
||||
},
|
||||
discordExecute(context) {
|
||||
const bot = context.bot
|
||||
@@ -125,7 +128,7 @@ for (const player of players) {
|
||||
component.push('\n')
|
||||
}
|
||||
const Embed = new EmbedBuilder()
|
||||
.setColor('#00FFFF')
|
||||
.setColor(`${bot.Commands.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(`${bot.getMessageAsPrismarine(`Players: (` + bot.players.length + ')')?.toString()}` + `${bot.getMessageAsPrismarine('\n')?.toString()}` + `${bot.getMessageAsPrismarine(component)?.toString()}`)
|
||||
bot.discord.Message.reply({embeds: [Embed]})
|
||||
@@ -133,4 +136,4 @@ const Embed = new EmbedBuilder()
|
||||
}
|
||||
}
|
||||
//what is wi
|
||||
// IDK
|
||||
// IDK
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
const CommandError = require('../util/command_error')
|
||||
module.exports = {
|
||||
name: 'mcserver', // command name here
|
||||
description: ['look up minecraft server info'], // command desc here
|
||||
aliases: [], // command aliases here if there is any
|
||||
trustLevel: 0, // 0 = public, 1 = trusted, 2 = owner, 3 = console
|
||||
usages: [], // command usage here
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const args = context.arguments
|
||||
const source = context.source
|
||||
}
|
||||
}
|
||||
+42
-21
@@ -1,42 +1,63 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
|
||||
const CommandError = require('../util/command_error')
|
||||
const { EmbedBuilder } = require('discord.js')
|
||||
module.exports = {
|
||||
name: 'memusage',
|
||||
//<< this one line of code broke it lmao
|
||||
description:['check the bots memusage'],
|
||||
trustLevel: 0,
|
||||
aliases:['memoryusage', 'memused','memoryused'],
|
||||
usage:[
|
||||
"on",
|
||||
"off"
|
||||
],
|
||||
aliases:['memoryusage', 'memused','memoryused'],
|
||||
usage:[
|
||||
"on",
|
||||
"off"
|
||||
],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const source = context.source
|
||||
const args = context.arguments
|
||||
if (!args && !args[0] && !args[1] && !args[2] && !args[3] && !args[4] ) return
|
||||
switch (args[0]) {
|
||||
switch (args[0]) {
|
||||
case 'on':
|
||||
bot.memusage.on()
|
||||
|
||||
bot.sendFeedback({text: 'Memusage is now enabled', color:'green'})
|
||||
bot.memusage.on()
|
||||
bot.sendFeedback([{ text: 'Memusage is now ', color: 'dark_gray' },{ text: 'enabled', color: 'green' }])
|
||||
break
|
||||
case 'off':
|
||||
bot.memusage.off()
|
||||
bot.sendFeedback({text:'Memusage is now disabled', color:'red'})
|
||||
|
||||
bot.sendFeedback([{ text: 'Memusage is now ', color: 'dark_gray'},{ text: 'disabled', color:'red' }])
|
||||
break
|
||||
default:
|
||||
throw new CommandError('Invalid argument')
|
||||
}
|
||||
},
|
||||
|
||||
discordExecute (context) {
|
||||
const bot = context.bot;
|
||||
const args = context.arguments;
|
||||
switch (args[0]) {
|
||||
case 'on':
|
||||
bot.memusage.on()
|
||||
let Embed = new EmbedBuilder()
|
||||
.setColor(`${bot.Commands.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(`Memusage is now enabled`)
|
||||
bot.discord.Message.reply({ embeds: [Embed] })
|
||||
break
|
||||
case 'off':
|
||||
bot.memusage.off()
|
||||
let Embed1 = new EmbedBuilder()
|
||||
.setColor(`${bot.Commands.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(`Memusage is now disabled`)
|
||||
bot.discord.Message.reply({ embeds: [Embed1] })
|
||||
break
|
||||
default:
|
||||
throw new CommandError('Invalid argument')
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
const Embed = new EmbedBuilder()
|
||||
.setColor('#00FFFF')
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(`${bot.getMessageAsPrismarine(`Players: (` + bot.players.length + ')')?.toString()}` + `${bot.getMessageAsPrismarine('\n')?.toString()}` + `${bot.getMessageAsPrismarine(component)?.toString()}`)
|
||||
bot.discord.Message.reply({embeds: [Embed]})
|
||||
|
||||
//[%s] %s › %s
|
||||
//was it showing like that before?
|
||||
// just do text bc too sus rn ig
|
||||
// You should remove the with thing and the translate and replace
|
||||
|
||||
// Parker, why is hashing just random characters???
|
||||
//wdym
|
||||
*/
|
||||
|
||||
@@ -1,256 +0,0 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
const fs = require('fs/promises')
|
||||
const { EmbedBuilder } = require('discord.js')
|
||||
const path = require('path')
|
||||
const getFilenameFromUrl = require('../util/getFilenameFromUrl')
|
||||
const fileExists = require('../util/file-exists')
|
||||
const fileList = require('../util/file-list')
|
||||
const axios = require('axios')
|
||||
const os = require('os')
|
||||
|
||||
let SONGS_PATH
|
||||
|
||||
|
||||
SONGS_PATH = path.join(__dirname, '../../', 'midis')
|
||||
|
||||
let song
|
||||
async function play (bot, values, selector, config) {
|
||||
try {
|
||||
const filepath = values.join(' ')
|
||||
|
||||
const seperator = path.sep // for hosting bot on windows
|
||||
|
||||
let absolutePath
|
||||
if (filepath.includes(seperator) && filepath !== '') {
|
||||
const pathSplitted = filepath.split(seperator)
|
||||
|
||||
const songs = await fileList(
|
||||
path.join(
|
||||
SONGS_PATH,
|
||||
pathSplitted[0]
|
||||
)
|
||||
)
|
||||
|
||||
|
||||
const lowerCaseFile = pathSplitted.pop().toLowerCase()
|
||||
const file = songs.filter((song) => song.toLowerCase().includes(lowerCaseFile))[0]
|
||||
|
||||
absolutePath = await resolve(path.join(pathSplitted.join(seperator), file))
|
||||
} else {
|
||||
const songs = await fileList(SONGS_PATH)
|
||||
const file = songs.filter((song) => song.toLowerCase().includes(filepath.toLowerCase()))[0]
|
||||
absolutePath = await resolve(file)
|
||||
}
|
||||
|
||||
song = await bot.music.load(await fs.readFile(absolutePath), path.basename(absolutePath))
|
||||
|
||||
|
||||
bot.sendFeedback([{ text: 'Added ', color: 'dark_gray' }, { text: song.name, color: '#00FFFF' }, { text: ' to the song queue', color: 'dark_gray' }])
|
||||
|
||||
|
||||
bot.music.queue.push(song)
|
||||
bot.music.play(song)
|
||||
} catch (e) {
|
||||
bot.console.error(e.stack)
|
||||
|
||||
bot.sendFeedback({ text: 'SyntaxError: Invalid file', color: 'red' })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async function playUrl (bot, values, selector, config) {
|
||||
let response
|
||||
try {
|
||||
const url = values.join(' ')
|
||||
response = await axios.get('http://localhost:8080', {
|
||||
params: {
|
||||
uri: url
|
||||
},
|
||||
responseType: 'arraybuffer'
|
||||
})
|
||||
|
||||
song = await bot.music.load(response.data, getFilenameFromUrl(url))
|
||||
bot.sendFeedback([{ text: 'Added ', color: 'dark_gray' }, { text: song.name, color: '#00FFFF' }, { text: ' to the song queue', color: 'dark_gray' }])
|
||||
|
||||
|
||||
bot.music.queue.push(song)
|
||||
bot.music.play(song)
|
||||
} catch (_err) {
|
||||
const e = _err.toString().includes('Bad MIDI file. Expected \'MHdr\', got: ') ? response.data.toString() : _err
|
||||
|
||||
bot.sendFeedback({ text: e, color: 'red' })
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
async function resolve (filepath) {
|
||||
if (!path.isAbsolute(filepath) && await fileExists(SONGS_PATH)) {
|
||||
return path.join(SONGS_PATH, filepath)
|
||||
}
|
||||
return filepath
|
||||
}
|
||||
|
||||
async function list (bot, discord, channeldc, prefix, selector, args, config) {
|
||||
try {
|
||||
let absolutePath
|
||||
if (args[1]) absolutePath = await resolve(path.join(SONGS_PATH, args.slice(1).join(' ')))
|
||||
else absolutePath = await resolve(SONGS_PATH)
|
||||
|
||||
if (!absolutePath.includes('midis')) throw new Error('bro trying to hack my server?!/1?!')
|
||||
|
||||
const listed = await fileList(absolutePath)
|
||||
let primary = true
|
||||
const message = []
|
||||
|
||||
for (const value of listed) {
|
||||
const isFile = (await fs.lstat(path.join(absolutePath, value))).isFile()
|
||||
message.push({
|
||||
text: value + ' ',
|
||||
color: (!((primary = !primary)) ? 'aqua' : 'blue'),
|
||||
clickEvent: {
|
||||
action: 'suggest_command',
|
||||
value: `${prefix}music ${isFile ? 'play' : 'list'} ${path.join(args.slice(1).join(' '), value)}`
|
||||
},
|
||||
hoverEvent: {
|
||||
action: 'show_text',
|
||||
contents: [
|
||||
{ text: 'Name: ', color: 'dark_gray' },
|
||||
{ text: value, color: '#00FFFF' },
|
||||
'\n',
|
||||
{ text: 'Click here to suggest the command!', color: 'green' }
|
||||
]
|
||||
}
|
||||
})
|
||||
};
|
||||
bot.sendFeedback([{ text: 'Songs ', color: 'dark_gray' },{ text: '(', color:'dark_blue' },{text: `${Object.keys(listed).length}`, color: 'gold' },{ text: ')', color: 'dark_blue' }])
|
||||
bot.sendFeedback(message)
|
||||
} catch (e) {
|
||||
|
||||
bot.sendFeedback({ text: e.toString(), color: 'red' })
|
||||
}
|
||||
|
||||
};
|
||||
module.exports = {
|
||||
name: 'music',
|
||||
description: 'Plays music',
|
||||
aliases: [],
|
||||
trustLevel: 0,
|
||||
usage: [
|
||||
'play <song|url>',
|
||||
'stop',
|
||||
'loop <all|current|off>',
|
||||
'list [directory]',
|
||||
'skip',
|
||||
'nowplaying',
|
||||
'queue'
|
||||
],
|
||||
execute (context, selector, config) {
|
||||
const args = context.arguments
|
||||
const bot = context.bot
|
||||
const prefix = bot.Commands.prefixes[0]
|
||||
if (!args && !args[0] && !args[1] && !args[2] && !args[3]) return
|
||||
switch (args[0]) {
|
||||
case 'play':
|
||||
case 'playurl': // deprecated
|
||||
|
||||
if (args.slice(1).join(' ').startsWith('http')) {
|
||||
playUrl(bot, args.slice(1), false, null, selector, config)
|
||||
} else {
|
||||
play(bot, args.slice(1), false, null, selector, config)
|
||||
}
|
||||
break
|
||||
case 'stop':
|
||||
bot.sendFeedback({ text: 'Cleared the song queue', color: 'dark_gray' })
|
||||
bot.music.stop()
|
||||
break
|
||||
case 'skip':
|
||||
try {
|
||||
bot.sendFeedback([{ text: 'Skipping ', color: 'dark_gray' }, { text: bot.music.song.name, color: '#00FFFF' }])
|
||||
bot.music.skip()
|
||||
} catch (e) {
|
||||
throw new CommandError('No music is currently playing!')
|
||||
}
|
||||
break
|
||||
case 'volume':
|
||||
if (isNaN(args.slice(1))) {
|
||||
throw new CommandError('Argument is not a number')
|
||||
} else if(args.slice(1) >= 6) {
|
||||
throw new CommandError('Too high!')
|
||||
} else {
|
||||
bot.music.volume = args.slice(1)
|
||||
bot.sendFeedback([{ text: 'Setting music volume to ', color: 'dark_gray'},{ text: `${bot.music.volume}`, color: 'gold'}])
|
||||
}
|
||||
break
|
||||
case 'loop':
|
||||
switch (args[1]) {
|
||||
case 'off':
|
||||
bot.music.loop = 0
|
||||
bot.sendFeedback([
|
||||
{
|
||||
text: 'Looping is now ',
|
||||
color: 'dark_gray',
|
||||
},
|
||||
{
|
||||
text: 'disabled',
|
||||
color: 'red'
|
||||
}
|
||||
])
|
||||
break
|
||||
case 'current':
|
||||
bot.music.loop = 1
|
||||
bot.sendFeedback([
|
||||
{
|
||||
text: 'Now Looping ',
|
||||
color: 'dark_gray'
|
||||
},
|
||||
{
|
||||
text: song.name,
|
||||
color: '#00FFFF'
|
||||
}
|
||||
])
|
||||
break
|
||||
case 'all':
|
||||
bot.music.loop = 2
|
||||
bot.sendFeedback({
|
||||
text: 'Now looping every song',
|
||||
|
||||
})
|
||||
break
|
||||
default:
|
||||
throw new SyntaxError('Invalid argument')
|
||||
}
|
||||
break
|
||||
case 'list':
|
||||
list(bot, false, null, prefix, selector, args, config)
|
||||
break
|
||||
case 'nowplaying':
|
||||
bot.sendFeedback([
|
||||
{
|
||||
text: 'Now playing ',
|
||||
color: 'dark_gray',
|
||||
},
|
||||
{
|
||||
text: bot.music.song.name,
|
||||
color: '#00FFFF'
|
||||
}
|
||||
])
|
||||
break
|
||||
case 'queue':
|
||||
const queueWithName = []
|
||||
for (const song of bot.music.queue) queueWithName.push(song.name)
|
||||
bot.sendFeedback([
|
||||
{
|
||||
text: 'Queue: ',
|
||||
color: 'dark_gray'
|
||||
},
|
||||
{
|
||||
text: queueWithName.join(', '),
|
||||
color: '#00FFFF'
|
||||
}
|
||||
])
|
||||
break
|
||||
default:
|
||||
throw new CommandError('Invalid argument')
|
||||
}
|
||||
}
|
||||
}
|
||||
+17
-40
@@ -1,4 +1,4 @@
|
||||
const CommandError = require('../CommandModules/command_error.js')
|
||||
const CommandError = require('../util/command_error.js')
|
||||
module.exports = {
|
||||
name: 'netmsg',
|
||||
description:['send a message to other servers'],
|
||||
@@ -6,53 +6,30 @@ module.exports = {
|
||||
aliases:['networkmessage'],
|
||||
usage:["<message>"],
|
||||
execute (context) {
|
||||
|
||||
const message = context.arguments.join(' ')
|
||||
const args = context.arguments
|
||||
const args = context.arguments
|
||||
const bot = context.bot
|
||||
|
||||
//throw new CommandError('ohio')
|
||||
const source = context.source
|
||||
const component = {
|
||||
translate: '[%s] [%s] %s \u203a %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'
|
||||
},
|
||||
],
|
||||
},
|
||||
bot.options.serverName,
|
||||
|
||||
context.source.player.displayName ?? context.source.player.profile.name,
|
||||
message
|
||||
]//command.split(' ')[0]
|
||||
}//string.replace()
|
||||
translate: '[%s] %s \u203a %s',
|
||||
color: 'gray',
|
||||
with: [
|
||||
context.bot.options.serverName,
|
||||
context?.source?.player?.displayName ?? context?.source?.player?.profile?.name,
|
||||
message
|
||||
]
|
||||
}
|
||||
if (!message[0]) {
|
||||
bot.sendFeedback({text:'Message is empty', color:'red'}, false)
|
||||
} else {
|
||||
for (const eachBot of bot.bots)
|
||||
if(!bot.options.Core.enabled){
|
||||
eachBot.chat(`[${bot.options.serverName}] ${bot.getMessageAsPrismarine(context.source.player.displayName ?? context.source.player.profile.name)?.toMotd().replaceAll('§','&')} \u203a ${message}`)
|
||||
}else{
|
||||
eachBot.tellraw(component)
|
||||
if (bot.options.isCreayun || bot.options.useChat) {
|
||||
eachBot.chat(`[${bot.options.serverName}] ${bot.getMessageAsPrismarine(context?.source?.player?.displayName ?? context?.source?.player?.profile?.name)?.toMotd().replaceAll('§','&')} \u203a ${message}`)
|
||||
} else {
|
||||
eachBot?.tellraw(component)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/*
|
||||
bot.options.host + ':' + bot.options.port,
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
const CommandError = require('../util/command_error');
|
||||
const { EmbedBuilder } = require('discord.js')
|
||||
module.exports = {
|
||||
name: 'ping', // command name here
|
||||
description: [''], // command desc here
|
||||
aliases: [], // command aliases here if there is any
|
||||
trustLevel: 0, // 0 = public, 1 = trusted, 2 = owner, 3 = console
|
||||
usages: [], // command usage here
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const args = context.arguments
|
||||
const source = context.source
|
||||
const player = source.player
|
||||
|
||||
if (args.join(' ') === null || bot.players.find(player => player.profile.name === `${args.join(' ')}`) === undefined) {
|
||||
bot.sendFeedback([{ text: 'Pong!', color: 'dark_gray' }, { text: ' 🏓\n', color: 'dark_gray' }, { text: `${bot.getMessageAsPrismarine(source.player.displayName)?.toMotd()}`, color: 'dark_gray' },{ text: '\nPing: ', color: 'dark_gray' },{ text: `${source.player.latency}`, color: 'green' }])
|
||||
} else if (args.join(' ') !== null) {
|
||||
bot.sendFeedback([{ text: `Pong! 🏓\n`, color: 'dark_gray' }, { text: `${bot.getMessageAsPrismarine(bot.players.find(player => player.profile.name === `${args.join(' ')}`).displayName)?.toMotd()}`, color: 'dark_gray' }, { text: '\nPing: ', color: 'dark_gray' },{ text: `${bot.players.find(player => player.profile.name === `${args.join(' ')}`).latency}`, color: 'green' }])
|
||||
}
|
||||
},
|
||||
discordExecute (context) {
|
||||
const bot = context.bot;
|
||||
const args = context.arguments;
|
||||
if (args.join(' ') === null || bot.players.find(player => player.profile.name === `${args.join(' ')}`) === undefined) {
|
||||
throw new CommandError('Incorrect player')
|
||||
} else {
|
||||
const Embed = new EmbedBuilder()
|
||||
.setColor(`${bot.Commands.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription('```' + bot.getMessageAsPrismarine([{ text: `Pong! 🏓\n`, color: 'dark_gray' }, { text: `${bot.getMessageAsPrismarine(bot.players.find(player => player.profile.name === `${args.join(' ')}`).displayName)?.toMotd()}`, color: 'dark_gray' }, { text: '\nPing: ', color: 'dark_gray' },{ text: `${bot.players.find(player => player.profile.name === `${args.join(' ')}`).latency}`, color: 'green' }])?.toString() + '```')
|
||||
bot.discord.Message.reply({embeds: [Embed]})
|
||||
}
|
||||
}
|
||||
}
|
||||
+54
-35
@@ -1,39 +1,58 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
const util = require('util')
|
||||
const { stylize } = require('../util/eval_colors')
|
||||
const CommandError = require('../util/command_error');
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
const util = require('util');
|
||||
|
||||
module.exports = {
|
||||
name: 'playerinfo',
|
||||
description:[''],
|
||||
aliases:[],
|
||||
trustLevel: 0,
|
||||
usage:[
|
||||
"",
|
||||
],
|
||||
description:['check player info'],
|
||||
aliases:[],
|
||||
trustLevel: 0,
|
||||
usage:[
|
||||
"<player>",
|
||||
],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const args = context.arguments
|
||||
const source = context.source
|
||||
try{
|
||||
//const player = bot.players.find(player => player.profile.name === `${args.join(' ')}`)
|
||||
const player = bot.players.find(player => player.profile.name === `${args.join(' ')}`)
|
||||
//bot.players.map(pl => pl.profile.name).filter((name) => name == "Ski")
|
||||
if(player === undefined) {
|
||||
|
||||
bot.tellraw('Unknown Player')
|
||||
}else{
|
||||
bot.sendFeedback([{text:`Player Name: `,color:'dark_gray'},{text:`${player.profile.name}`}])
|
||||
bot.sendFeedback([{text:`Player UUID: `,color:'dark_gray'},{text:`${player.uuid}`,color:'gold'}])
|
||||
bot.sendFeedback([{text:`Player Gamemode: `,color:'dark_gray'},{text:`${player.gamemode}`,color:'gold'}])
|
||||
bot.sendFeedback([{text:`Player Latency: `,color:'dark_gray'},{text:`${player.latency}`,color:'gold'}])
|
||||
bot.sendFeedback([{text:`Player DisplayName: `,color:'dark_gray'},{text:`${bot.getMessageAsPrismarine(player.displayName ?? player.profile.name)?.toMotd().replaceAll('§','§')}`}])
|
||||
}
|
||||
}catch(e){
|
||||
bot.tellraw(`${e}`)
|
||||
}//bot.players.find(player => player.profile.name === `Ski`); bot.getMessageAsPrismarine(e.displayName)?.toMotd().replaceAll('§','§')
|
||||
},
|
||||
discordExecute(context) {
|
||||
const bot = context.bot
|
||||
const args = context.arguments
|
||||
const source = context.source
|
||||
}
|
||||
const bot = context.bot;
|
||||
const args = context.arguments;
|
||||
const source = context.source;
|
||||
const player = bot.players.find(player => player.profile.name === `${args.join(' ')}`);
|
||||
try {
|
||||
if (player === undefined) {
|
||||
bot.tellraw('Unknown Player')
|
||||
} else {
|
||||
bot.sendFeedback([{text:`Player Name: `,color:'gray'},{text:`${player.profile.name}`}])
|
||||
bot.sendFeedback([{text:`Player UUID: `,color:'gray'},{text:`${player.uuid}`,color:'gold'}])
|
||||
bot.sendFeedback([{text:`Player Gamemode: `,color:'gray'},{text:`${player.gamemode}`,color:'gold'}])
|
||||
bot.sendFeedback([{text:`Player Latency: `,color:'gray'},{text:`${player.latency}`,color:'gold'}])
|
||||
bot.sendFeedback([{text:`Player DisplayName: `,color:'gray'},{text:`${bot.getMessageAsPrismarine(player.displayName ?? player.profile.name)?.toMotd().replaceAll('§','§')}`}])
|
||||
}
|
||||
} catch(e) {
|
||||
bot.tellraw(`${e}`)
|
||||
}
|
||||
},
|
||||
discordExecute(context) {
|
||||
const bot = context.bot;
|
||||
const args = context.arguments;
|
||||
const source = context.source;
|
||||
const player = bot.players.find(player => player.profile.name === `${args.join(' ')}`);
|
||||
/*
|
||||
bot.sendFeedback([{text:`Player Name: `,color:'dark_gray'},{text:`${player.profile.name}`}])
|
||||
bot.sendFeedback([{text:`Player UUID: `,color:'dark_gray'},{text:`${player.uuid}`,color:'gold'}])
|
||||
bot.sendFeedback([{text:`Player Gamemode: `,color:'dark_gray'},{text:`${player.gamemode}`,color:'gold'}])
|
||||
bot.sendFeedback([{text:`Player Latency: `,color:'dark_gray'},{text:`${player.latency}`,color:'gold'}])
|
||||
bot.sendFeedback([{text:`Player DisplayName: `,color:'dark_gray'},{text:`${bot.getMessageAsPrismarine(player.displayName ?? player.profile.name)?.toMotd().replaceAll('§','§')}`}])
|
||||
*/
|
||||
try {
|
||||
if (player === undefined) {
|
||||
throw new CommandError('Player not found')
|
||||
} else {
|
||||
let Embed = new EmbedBuilder()
|
||||
.setColor(`${bot.Commands.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription('```ansi\n' + bot.getMessageAsPrismarine([{text:`Player Name: `,color:'gray'},{text:`${player.profile.name}`},{text:`\nPlayer UUID: `,color:'gray'},{text:`${player.uuid}`,color:'gold'},{text:`\nPlayer Gamemode: `,color:'gray'},{text:`${player.gamemode}`,color:'gold'},{text:`\nPlayer Latency: `,color:'gray'},{text:`${player.latency}`,color:'gold'},{text:`\nPlayer DisplayName: `,color:'gray'},{text:`${bot.getMessageAsPrismarine(player.displayName ?? player.profile.name)?.toMotd().replaceAll('§','§')}`}])?.toAnsi().replaceAll('`', '`\u200b') + '```')
|
||||
bot.discord.Message.reply({ embeds: [Embed] })
|
||||
}
|
||||
} catch (e) {
|
||||
bot.discord.Message.reply(e.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+21
-13
@@ -1,19 +1,27 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
const CommandError = require('../util/command_error')
|
||||
module.exports = {
|
||||
name: 'rc',
|
||||
description:['refill the bots core'],
|
||||
trustLevel: 0,
|
||||
aliases:['refillcore'],
|
||||
usages:[""],
|
||||
name: 'refillcore',
|
||||
description:['refill the bots core'],
|
||||
trustLevel: 0,
|
||||
aliases:['rc'],
|
||||
usages:[""],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const bot = context.bot
|
||||
|
||||
if (!bot.options.Core.enabled){
|
||||
throw new CommandError('&4Could not fill core because Coreless mode is active!')
|
||||
}else {
|
||||
|
||||
if (bot.options.useChat || bot.options.isCreayun) {
|
||||
throw new CommandError('&4Could not fill core because useChat or isCreayun is active!')
|
||||
} else {
|
||||
bot.core.refill()
|
||||
bot.sendFeedback('Successfully Refilled Core!')
|
||||
bot.sendFeedback('refilling core,......')
|
||||
}
|
||||
},
|
||||
discordExecute (context) {
|
||||
const bot = context.bot;
|
||||
if (bot.options.useChat || bot.options.isCreayun) {
|
||||
throw new CommandError('&4Could not fill core because Coreless mode is active!')
|
||||
} else {
|
||||
bot.core.refill()
|
||||
bot.discord.Message.reply('refilling core,......')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+20
-11
@@ -1,20 +1,29 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
const CommandError = require('../util/command_error')
|
||||
const { EmbedBuilder } = require('discord.js');
|
||||
module.exports = {
|
||||
name: 'reconnect',
|
||||
description:['reconnect the bot when?'],
|
||||
trustLevel: 1,
|
||||
aliases:['rec'],
|
||||
usage:[""],
|
||||
description:['reconnect the bot when?'],
|
||||
trustLevel: 1,
|
||||
aliases:['rec', 'end', 'reconnect-client'],
|
||||
usage:[""],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const message = context.arguments.join(' ')
|
||||
const args = context.arguments
|
||||
const source = context.source
|
||||
bot.sendFeedback({ text: `Reconnecting to ${bot.options.host}:${bot.options.port}`, color: 'dark_green'})
|
||||
|
||||
|
||||
bot._client.end()
|
||||
}
|
||||
const source = context.source
|
||||
bot.sendFeedback({ text: `Reconnecting to ${bot.options.host}:${bot.options.port}`, color: 'dark_green'})
|
||||
bot._client.end(`Reconnecting to ${bot.options.host}:${bot.options.port} requested by ${bot.getMessageAsPrismarine(source?.player?.displayName ?? source?.player?.profile?.name)?.toMotd()}`)
|
||||
},
|
||||
discordExecute (context) {
|
||||
const bot = context.bot;
|
||||
const source = context.source;
|
||||
const Embed = new EmbedBuilder()
|
||||
.setColor(`${bot.Commands.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(`Reconnecting to ${bot.options.host}:${bot.options.port}`)
|
||||
bot?.discord?.Message?.reply({embeds: [Embed]})
|
||||
bot._client.end(`Reconnecting to ${bot.options.host}:${bot.options.port} requested by ${source?.player?.displayName ??source?.player?.profile?.name}`)
|
||||
}
|
||||
}
|
||||
/*context.source.sendFeedback('farding right now....')
|
||||
process.exit(1)
|
||||
|
||||
+33
-25
@@ -1,36 +1,44 @@
|
||||
const { EmbedBuilder } = require('discord.js')
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
const CommandError = require('../util/command_error')
|
||||
module.exports = {
|
||||
name: 'reload',
|
||||
description:['Reload the bots files'],
|
||||
aliases:[],
|
||||
trustLevel: 0,
|
||||
usage:["reload"],
|
||||
description:['Reload the bots files'],
|
||||
aliases:[],
|
||||
trustLevel: 0,
|
||||
usage:["reload"],
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const args = context.arguments
|
||||
const source = context.source
|
||||
try {
|
||||
bot.sendFeedback({text:'Reloading crap'});
|
||||
for (const eachBot of bot.bots)
|
||||
eachBot.reload()
|
||||
}catch(e){
|
||||
bot.sendFeedback(e.stack)
|
||||
}
|
||||
const source = context.source
|
||||
try {
|
||||
|
||||
// bot.sendFeedback({text:'Reloading crap'});
|
||||
for (const eachBot of bot.bots) {
|
||||
eachBot.commandReload()
|
||||
}
|
||||
} catch(e) {
|
||||
bot.sendFeedback(e.stack)
|
||||
}
|
||||
if (bot.options.isCreayun) {
|
||||
bot.chat('Reloading shit')
|
||||
} else {
|
||||
bot.sendFeedback({text:'Reloading Shit'})
|
||||
}
|
||||
},
|
||||
discordExecute(context) {
|
||||
const bot = context.bot
|
||||
const source = context.source
|
||||
try {
|
||||
const Embed = new EmbedBuilder()
|
||||
.setColor('#00FFFF')
|
||||
const bot = context.bot
|
||||
const source = context.source
|
||||
try {
|
||||
const Embed = new EmbedBuilder()
|
||||
.setColor(`${bot.Commands.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(`reloading commands`)
|
||||
bot.discord.Message.reply({embeds: [Embed]})
|
||||
for (const eachBot of bot.bots)
|
||||
eachBot.reload()
|
||||
}catch(e) {
|
||||
throw new CommandError(e.stack)
|
||||
}
|
||||
.setDescription(`reloading crap`)
|
||||
bot.discord.Message.reply({ embeds: [Embed] })
|
||||
for (const eachBot of bot.bots) {
|
||||
eachBot.commandReload()
|
||||
}
|
||||
} catch(e) {
|
||||
throw new CommandError(e.stack)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,59 +0,0 @@
|
||||
const CommandError = require("../CommandModules/command_error");
|
||||
const buildstring = process.env["buildstring"];
|
||||
const foundation = process.env["FoundationBuildString"];
|
||||
module.exports = {
|
||||
name: "say",
|
||||
//<< this one line of code broke it lmao
|
||||
description: ["make me say something in custom chat"],
|
||||
trustLevel: 0,
|
||||
aliases: [
|
||||
"tellrawsay",
|
||||
"tellrawmsg",
|
||||
"trmessage",
|
||||
"tellrawmessage",
|
||||
"sourcesendfeedbacksay",
|
||||
"sourcesendfeedbackmsg",
|
||||
"sourcesendfeedbackmessage",
|
||||
"ssfbmsg",
|
||||
"ssfmessage",
|
||||
],
|
||||
usage:["<message>"],
|
||||
execute(context) {
|
||||
const message = context.arguments.join(" ");
|
||||
const bot = context.bot;
|
||||
|
||||
const prefix = {
|
||||
translate: "[%s%s%s] \u203a %s",
|
||||
bold: false,
|
||||
color: "white",
|
||||
with: [
|
||||
{
|
||||
color: "dark_purple",
|
||||
text: "FNF",
|
||||
bold: true,
|
||||
},
|
||||
{
|
||||
color: "#00FFFF",
|
||||
text: "Boyfriend",
|
||||
bold: true,
|
||||
},
|
||||
{ color: "dark_red", text: "Bot", bold: true },
|
||||
|
||||
{ color: "green", text: `${message}` },
|
||||
],
|
||||
};
|
||||
//if(!bot.options.Core.enabled){
|
||||
// throw new CommandError('&4Will not work because the core is not enabled please use the echo command')
|
||||
//}else{
|
||||
bot.tellraw([prefix]);
|
||||
}
|
||||
// },
|
||||
};
|
||||
|
||||
//[%s] %s › %s
|
||||
//was it showing like that before?
|
||||
// just do text bc too sus rn ig
|
||||
// You should remove the with thing and the translate and replace
|
||||
|
||||
// Parker, why is hashing just random characters???
|
||||
//wdym
|
||||
@@ -1,4 +1,4 @@
|
||||
const CommandError = require('../CommandModules/command_error.js')
|
||||
const CommandError = require('../util/command_error.js')
|
||||
module.exports = {
|
||||
name: 'sctoggle',
|
||||
description:['toggle the selfcare'],
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
const CommandError = require('../util/command_error')
|
||||
|
||||
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,
|
||||
aliases:['sfd'],
|
||||
trustLevel: 2,
|
||||
aliases:['sfd'],
|
||||
description:['selfdestruct server'],
|
||||
usage:[""],
|
||||
usage:[""],
|
||||
execute (context) {
|
||||
//throw new CommandError('temp disabled')
|
||||
|
||||
@@ -16,7 +15,7 @@ usage:[""],
|
||||
|
||||
//ima just connect to your server to work on the bot ig
|
||||
// idk
|
||||
|
||||
const bot = context.bot
|
||||
const args = context.arguments
|
||||
|
||||
if (args[1] === 'clear' || args[1] === 'stop') {
|
||||
@@ -28,7 +27,9 @@ usage:[""],
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (bot.options.isCreayun || bot.options.useChat) {
|
||||
throw new CommandError(`Cannot execute command because isCreayun or useChat is enabled!`)
|
||||
} else {
|
||||
if (this.timer !== null) return
|
||||
this.timer = setInterval(function () {
|
||||
bot.core.run('day')
|
||||
@@ -62,3 +63,4 @@ clearInterval(this.timer)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,27 +1,50 @@
|
||||
const CommandError = require('../CommandModules/command_error')
|
||||
const CommandError = require('../util/command_error')
|
||||
const { stylize } = require('../util/eval_colors')
|
||||
const util = require('util')
|
||||
const { EmbedBuilder } = require('discord.js')
|
||||
module.exports = {
|
||||
name: 'servereval',
|
||||
description:['run code unisolated'],
|
||||
trustLevel: 2,
|
||||
trustLevel: 3,
|
||||
aliases:['svreval'],
|
||||
usage: ['<js code>'],
|
||||
execute (context, arguments, selector) {
|
||||
execute (context) {
|
||||
const bot = context.bot;
|
||||
const source = context.source;
|
||||
const args = context.arguments;
|
||||
const script = args.slice(1).join(' ');
|
||||
if (!args && !args[0] && !args[1] && !args[2] && !args[3] && !args[4] ) return
|
||||
try {
|
||||
if (bot.options.useChat) {
|
||||
bot.chat(bot.getMessageAsPrismarine({ text: util.inspect(eval(script), { stylize }).substring(0, 32700) })?.toMotd().replaceAll('§','&'))
|
||||
if (bot.options.useChat || bot.options.useChat) {
|
||||
bot.chat(bot.getMessageAsPrismarine({ text: util.inspect(eval(script), { stylize }).substring(0, 32700) })?.toMotd().replaceAll('§','&'))
|
||||
} else {
|
||||
bot.sendFeedback({ text: util.inspect(eval(script), { stylize }).substring(0, 32700) })
|
||||
bot.sendFeedback({ text: `Script input: ${script}` })
|
||||
bot.sendFeedback({ text: util.inspect(eval(script), { stylize }).substring(0, 32700) })
|
||||
bot.sendFeedback({ text: `Script input: ${script}` })
|
||||
}
|
||||
} catch (err) {
|
||||
if (bot.options.isCreayun || bot.options.useChat) {
|
||||
bot.chat(`&4${err.message}`)
|
||||
} else {
|
||||
bot.sendFeedback({ text: err.message, color: 'red' })
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
discordExecute (context) {
|
||||
const bot = context.bot;
|
||||
const args = context.arguments;
|
||||
const source = context.source;
|
||||
try {
|
||||
let Embed = new EmbedBuilder()
|
||||
.setColor(`${bot.Commands.colors.discord.embed}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(bot.getMessageAsPrismarine('```js\n' + util.inspect(eval(args.join(' '))) + '```')?.toMotd())
|
||||
bot.discord.Message.reply({ embeds: [Embed] })
|
||||
} catch (e) {
|
||||
let Embed = new EmbedBuilder()
|
||||
.setColor(`${bot.Commands.colors.discord.error}`)
|
||||
.setTitle(`${this.name} Command`)
|
||||
.setDescription(e.toString())
|
||||
bot.discord.Message.reply({ embeds: [Embed] })
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
const CommandError = require('../util/command_error')
|
||||
const { spawn } = require('node:child_process');
|
||||
module.exports = {
|
||||
name: 'serverterminal', // command name here
|
||||
description: ['run commands unisolated'], // command desc here
|
||||
aliases: [], // command aliases here if there is any
|
||||
trustLevel: 3, // 0 = public, 1 = trusted, 2 = owner, 3 = console
|
||||
usage: [], // command usage here
|
||||
execute (context) {
|
||||
const bot = context.bot
|
||||
const args = context.arguments
|
||||
const source = context.source
|
||||
const command = spawn('sh' , ['-c', `${args.slice(1).join(' ')}`]);
|
||||
try {
|
||||
command.stdout.on('data', (data, err) => {
|
||||
bot.tellraw(`${bot.getMessageAsPrismarine(`${data}`)?.toMotd().replace(/[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g, '')}`);
|
||||
console.log(err)
|
||||
});
|
||||
|
||||
command.on('close', (data) => {
|
||||
console.log(`child process close all stdio with code ${data}`);
|
||||
});
|
||||
command.stderr.on('data', (data) => {
|
||||
bot.tellraw(data.toString());
|
||||
});
|
||||
command.on('exit', (code) => {
|
||||
console.log(`child process exited with code ${code}`);
|
||||
});
|
||||
} catch (e) {
|
||||
bot.sendError(e.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user