the 100 prefix update
This commit is contained in:
parent
f06bdf3d9d
commit
589266f027
1 changed files with 18 additions and 5 deletions
23
index.js
23
index.js
|
@ -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();
|
||||
})
|
Loading…
Reference in a new issue