mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-30 10:56:55 -05:00
fix mabe??
This commit is contained in:
parent
1d1e5ce53a
commit
5105666bcd
1 changed files with 1 additions and 6 deletions
|
@ -57,14 +57,9 @@ function parsePlayerMessages(message, packet, bot) {
|
||||||
} else if (raw.match(/.* .*\u00BB .*/g)) {
|
} else if (raw.match(/.* .*\u00BB .*/g)) {
|
||||||
const username = raw.replace(/.*?\[.*?\] /g, '').replace(/\u00BB.*/g, '').replace(/§#....../gm, '').split(' ')[0];
|
const username = raw.replace(/.*?\[.*?\] /g, '').replace(/\u00BB.*/g, '').replace(/§#....../gm, '').split(' ')[0];
|
||||||
const message = raw.split('\u00BB ')[1].substring(2);
|
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);
|
bot.emit('message', username, message, packet.sender);
|
||||||
} else if (raw.match(/<.*> .*/g)) {
|
} else if (raw.match(/<.*> .*/g)) {
|
||||||
const username = raw.substring(3).split('>')[0];
|
const username = raw.substring(1).split('>')[0];
|
||||||
const message = raw.split('> ')[1];
|
const message = raw.split('> ')[1];
|
||||||
|
|
||||||
bot.emit('message', username, message, packet.sender);
|
bot.emit('message', username, message, packet.sender);
|
||||||
|
|
Loading…
Reference in a new issue