This commit is contained in:
ChomeNS 2022-11-18 09:54:53 +07:00
parent d67ca1f920
commit 532aea0550

View file

@ -58,12 +58,12 @@ function parsePlayerMessages(message, packet, bot) {
bot.emit('message', username, message, packet.sender);
} else if (raw.match(/.* .*\u203a .*/g)) {
// if (packet.sender === '00000000-0000-0000-0000-000000000000') return;
const username = raw.replace(/.*?\[.*?\] /g, '').replace(/\u203a.*/g, '').replace(/§#....../gm, '').split(' ')[0];
const username = raw.replace(/.*?\[.*?\] /, '').replace(/\u203a.*/g, '').replace(/§#....../gm, '').split(' ')[0];
const message = raw.split('\u203a ')[1].substring(2);
bot.emit('message', username, message, packet.sender);
} else if (raw.match(/.* .*\u00BB .*/g)) {
// if (packet.sender === '00000000-0000-0000-0000-000000000000') return;
const username = raw.replace(/.*?\[.*?\] /g, '').replace(/\u00BB.*/g, '').replace(/§#....../gm, '').split(' ')[0];
const username = raw.replace(/.*?\[.*?\] /, '').replace(/\u00BB.*/g, '').replace(/§#....../gm, '').split(' ')[0];
const message = raw.split('\u00BB ')[1].substring(2);
bot.emit('message', username, message, packet.sender);
} else if (raw.match(/<.*§r> .*/g)) {