the 100 prefix update

This commit is contained in:
m_c_player 2024-10-10 07:56:44 -04:00
parent f06bdf3d9d
commit 589266f027

View file

@ -5,7 +5,7 @@
const { parseFormatCodes } = require("./pcc");
const config = require("./conf");
const mc = require('minecraft-protocol');
const prefixes = ['radium:', 'r!', 'radium!', 'r/', 'radium/', '⁄€‹›fifl‡°·‚—±Œ„´‰ˇÁ¨ˆØ∏”’»ÅÍÎÏ˝ÓÔÒÚƸ˛Ç◊ı˜Â¯˘¿¡™£¢∞¶•ªº–≠œ∑´®†¥¨ˆøπ“‘«åß∂ƒ©˙∆˚¬…æΩ≈ç√∫˜µ≤≥÷'.split('')].flat();
const prefixes = ['radium:', 'r:', 'r!', 'radium!', 'r/', 'radium/', 'rad:', 'rad!', 'rad/', '⁄€‹›fifl‡°·‚—±Œ„´‰ˇÁ¨ˆØ∏”’»ÅÍÎÏ˝ÓÔÒÚƸ˛Ç◊ı˜Â¯˘¿¡™£¢∞¶•ªº–≠œ∑´®†¥¨ˆøπ“‘«åß∂ƒ©˙∆˚¬…æΩ≈ç√∫˜µ≤≥÷'.split('')].flat();
// random name function
function random(length) {
@ -21,6 +21,7 @@
};
// bot creation
function main () {
var bots = [];
var client = mc.createClient
(
@ -63,7 +64,9 @@
client.on("systemChat", async ({ formattedMessage, positionId }) => {
try {
var msg = new ChatMessage(JSON.parse(formattedMessage))
console.log(parseFormatCodes("&c[&6System Chat&c] ") + msg.toAnsi());
if (!String(msg).startsWith("Command set: ")) {
console.log(parseFormatCodes("&c[&6System Chat&c] ") + msg.toAnsi());
}
} catch (err) {
console.log(parseFormatCodes("&c[&6Error&c] ") + err)
}
@ -135,7 +138,7 @@ function commandError(players, errorTitle, otherthing) {
(
[
{
"text": "Radium » List of commands (" + Object.keys(cmds).length + "):\n" + Object.keys(cmds).join(" | ")
"text": "Radium » List of commands (" + Object.keys(cmds).length + "):\n" + Object.keys(cmds).join(" ")
}
]
)
@ -159,7 +162,7 @@ function commandError(players, errorTitle, otherthing) {
};
},
prefixes: async () => {
tellraw("@a", JSON.stringify(`Prefixes (${prefixes.length}): ` + prefixes.join(" | ")));
tellraw("@a", JSON.stringify(`Prefixes (${prefixes.length}): ` + prefixes.join(" ")));
},
wiki: async (args) => {
// Credits: FNFBoyfriendBot, Parker2991
@ -231,4 +234,14 @@ client.on("playerChat", chatListener);
client.on("end", () => {
client.off("playerChat", chatListener);
}); // idfk what this does
});
// on disconnect, rejoin
client.on("end", () => {
main();
})
}
main();
// on error, rejoin
process.on("error", () => {
main();
})