Browse Source

dont doubleup

push-params
Evan Feenstra 4 years ago
parent
commit
fbcec0bcbe
  1. 7
      api/network/intercept.ts
  2. 8
      dist/api/network/intercept.js
  3. 2
      dist/api/network/intercept.js.map

7
api/network/intercept.ts

@ -39,10 +39,6 @@ export async function isBotMsg(msg:Msg, sentByMe:boolean): Promise<boolean> {
await asyncForEach(botsInTribe, async botInTribe=>{
console.log('botInTribe.botPrefix',botInTribe.botPrefix)
if(txt.startsWith(`${botInTribe.botPrefix} `)){
builtinBotEmit(msg)
didEmit = true
}
if(botInTribe.msgTypes){
try {
const msgTypes = JSON.parse(botInTribe.msgTypes)
@ -51,6 +47,9 @@ export async function isBotMsg(msg:Msg, sentByMe:boolean): Promise<boolean> {
didEmit = true
}
} catch(e){}
} else if(txt.startsWith(`${botInTribe.botPrefix} `)){
builtinBotEmit(msg)
didEmit = true
}
})

8
dist/api/network/intercept.js

@ -44,10 +44,6 @@ function isBotMsg(msg, sentByMe) {
return false;
yield asyncForEach(botsInTribe, (botInTribe) => __awaiter(this, void 0, void 0, function* () {
console.log('botInTribe.botPrefix', botInTribe.botPrefix);
if (txt.startsWith(`${botInTribe.botPrefix} `)) {
bots_1.builtinBotEmit(msg);
didEmit = true;
}
if (botInTribe.msgTypes) {
try {
const msgTypes = JSON.parse(botInTribe.msgTypes);
@ -58,6 +54,10 @@ function isBotMsg(msg, sentByMe) {
}
catch (e) { }
}
else if (txt.startsWith(`${botInTribe.botPrefix} `)) {
bots_1.builtinBotEmit(msg);
didEmit = true;
}
}));
return didEmit;
});

2
dist/api/network/intercept.js.map

@ -1 +1 @@
{"version":3,"file":"intercept.js","sourceRoot":"","sources":["../../../api/network/intercept.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,sCAAkC;AAClC,kCAAsC;AAEtC,MAAM,eAAe,GAAG;IACtB,MAAM,CAAC,cAAc;CACtB,CAAA;AAED;;;EAGE;AAEF,kDAAkD;AAClD,SAAsB,QAAQ,CAAC,GAAO,EAAE,QAAgB;;QACtD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