This commit is contained in:
Yaode_owo 2024-09-07 07:41:20 -04:00
parent 93ea0c124d
commit a3c904d867

View file

@ -19,6 +19,7 @@ bot.on('systemChat', (packet) => {
const msg = parseMinecraftMessage(packet.formattedMessage);
const nocolormsg = parseMinecraftMessageNoColor(packet.formattedMessage);
const cspy = parseCommand(nocolormsg)
if (!cspy) bot.emit('custom_Commandspy', msg);
if (jsonmsg === undefined) { // idk, but work
if (msg !== undefined) bot.emit('custom_systemChat', msg, nocolormsg, false);
} else {
@ -200,7 +201,7 @@ function parseMinecraftMessageNoColor(component) {
}
if (comp && typeof comp === 'string' || typeof comp === 'number' && comp !== undefined && comp !== null) {
return comp;
}}
}
if (comp.extra) {
comp.extra.forEach(subComp => {
text += extractText(subComp);