diff --git a/util/chat.js b/util/chat.js index 7ec7a53..6fc3b8a 100644 --- a/util/chat.js +++ b/util/chat.js @@ -49,7 +49,7 @@ function parsePlayerMessages (message, packet, bot) { bot.emit('chat', username, message) } else if (raw.match(/.* .*\u00BB .*/g)) { const username = raw.replace(/.*?\[.*?\] /g, '').replace(/\u00BB.*/g, '').replace(/§#....../gm, '').split(' ')[0] - const message = raw.split('\u00BB ').slice(1).join(' ').substring(2) + const message = raw.split('\u00BB ').slice(1).join(' ') bot.emit('chat', username, message) } else if (raw.match(/.* .*> .*/g)) { const username = raw.replace(/.*?\[.*?\] /g, '').replace(/>.*/g, '').replace(/§#....../gm, '').split(' ')[0]