From a87c803f266878e39ee6299e7b74bcd4cdefeb70 Mon Sep 17 00:00:00 2001 From: ChomeNS Date: Sun, 28 Aug 2022 08:35:52 +0700 Subject: [PATCH] \u00BB (hbot discord support) --- plugins/chat.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/chat.js b/plugins/chat.js index 984e0e4..103376d 100644 --- a/plugins/chat.js +++ b/plugins/chat.js @@ -33,6 +33,11 @@ function inject(bot) { const username = raw.replace(/.*?\[.*?\] /g, '').replace(/\u203a.*/g, '').replace(/§#....../gm, '').split(' ')[0]; const message = raw.split('\u203a ')[1]; 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 message = raw.split('\u00BB ')[1]; + bot.emit('message', username, message, packet.sender); } else if (raw.match(/<.*§r> .*/g)) { // if (packet.sender === '00000000-0000-0000-0000-000000000000') return;