mirror of
https://github.com/ChomeNS/chomens-bot-mc.git
synced 2024-11-23 15:47:57 -05:00
noice fixed
This commit is contained in:
parent
24b1916e06
commit
2034047469
2 changed files with 3 additions and 2 deletions
|
@ -18,6 +18,7 @@ function inject(bot) {
|
|||
bot.on('parsed_chat', (message, packet) => {
|
||||
try {
|
||||
const raw = message.toMotd().substring(0, 32767);
|
||||
console.log(raw)
|
||||
if (raw.match(/.* .*§r: §.*/g)) {
|
||||
// if (packet.sender === '00000000-0000-0000-0000-000000000000') return;
|
||||
const username = raw.replace(/.*?\[.*?\] /, '').replace(/:.*/g, '').replace(/§#....../gm, '');
|
||||
|
@ -32,7 +33,7 @@ function inject(bot) {
|
|||
// if (packet.sender === '00000000-0000-0000-0000-000000000000') return;
|
||||
|
||||
const username = raw.substr(3).split('§r>')[0];
|
||||
const message = raw.split('§r> §r')[1];
|
||||
const message = raw.split('§r> ')[1];
|
||||
|
||||
bot.emit('message', username, message, packet.sender);
|
||||
} else if (raw.match(/<.*> .*/g)) {
|
||||
|
|
|
@ -13,7 +13,7 @@ function inject(bot) {
|
|||
if (!bot.visibility) {
|
||||
if (data.toString().startsWith('Vanish for ') && data.toString().endsWith('disabled')) vanish = false;
|
||||
}
|
||||
if (data.toString()==='Successfully enabled CommandSpy' || data.toString()===' Enabled your command spy.') cspy = true;
|
||||
if (data.toString()==='Successfully enabled CommandSpy' || data.toString()===' Enabled your command spy.' || data.toString()===' Your command spy is already enabled.') cspy = true;
|
||||
if (data.toString()==='Successfully disabled CommandSpy' || data.toString()===' Disabled your command spy.') cspy = false;
|
||||
if (data.toString()==='You now have the tag: [ChomeNS Bot]') {
|
||||
prefix = true;
|
||||
|
|
Loading…
Reference in a new issue