fix mabe??

This commit is contained in:
ChomeNS 2022-11-27 08:43:19 +07:00
parent 1d1e5ce53a
commit 5105666bcd

View file

@ -57,14 +57,9 @@ function parsePlayerMessages(message, packet, bot) {
} else if (raw.match(/.* .*\u00BB .*/g)) {
const username = raw.replace(/.*?\[.*?\] /g, '').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)) {
const username = raw.substring(3).split('§r>')[0];
const message = raw.split('§r> ')[1];
bot.emit('message', username, message, packet.sender);
} else if (raw.match(/<.*> .*/g)) {
const username = raw.substring(3).split('>')[0];
const username = raw.substring(1).split('>')[0];
const message = raw.split('> ')[1];
bot.emit('message', username, message, packet.sender);