From 93dd357e0130d8388b4993c150f9e2bd653e20d3 Mon Sep 17 00:00:00 2001 From: Evan Feenstra Date: Fri, 27 Nov 2020 16:10:51 -0800 Subject: [PATCH] log --- dist/src/builtin/index.js | 1 + dist/src/builtin/index.js.map | 2 +- dist/src/network/intercept.js | 1 + dist/src/network/intercept.js.map | 2 +- src/builtin/index.ts | 1 + src/network/intercept.ts | 1 + 6 files changed, 6 insertions(+), 2 deletions(-) diff --git a/dist/src/builtin/index.js b/dist/src/builtin/index.js index 3affc20..e6d6933 100644 --- a/dist/src/builtin/index.js +++ b/dist/src/builtin/index.js @@ -37,6 +37,7 @@ function init() { exports.init = init; function builtinBotEmit(msg) { setTimeout(() => { + console.log("BUILT IN BOT EMIT", bots_1.buildBotPayload(msg)); SphinxBot._emit('message', bots_1.buildBotPayload(msg)); }, 1200); } diff --git a/dist/src/builtin/index.js.map b/dist/src/builtin/index.js.map index 7b763ce..bc4ef9b 100644 --- a/dist/src/builtin/index.js.map +++ b/dist/src/builtin/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/builtin/index.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,mDAAmD;AACnD,wCAAuC;AACvC,sCAAqC;AACrC,wCAAuC;AACvC,kCAAiC;AAEjC,sCAAkC;AAClC,8CAAmD;AAuBvB,0BAvBpB,sBAAe,CAuBoB;AAtB3C,4CAAoC;AAEpC,SAAe,IAAI;;QACf,SAAS,CAAC,IAAI,EAAE,CAAA;QAEhB,MAAM,WAAW,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAC,KAAK,EAAC;gBACpD,OAAO,EAAE,mBAAS,CAAC,SAAS,CAAC,OAAO;aACvC,EAAC,CAAC,CAAA;QACH,IAAG,CAAC,CAAC,WAAW,IAAI,WAAW,CAAC,MAAM,CAAC;YAAE,OAAM;QAE/C,WAAW,CAAC,OAAO,CAAC,CAAC,CAAA,EAAE;YACnB,IAAG,CAAC,CAAC,S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GAAE,EAAE;QACX,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAC,sBAAe,CAAC,GAAG,CAAC,CAAC,CAAA;QACrD,SAAS,CAAC,KAAK,CAAC,SAAS,EAAE,sBAAe,CAAC,GAAG,CAAC,CAAC,CAAA;IACpD,CAAC,EAAC,IAAI,CAAC,CAAA;AACX,CAAC;AAEY,wCAAc"} \ No newline at end of file diff --git a/dist/src/network/intercept.js b/dist/src/network/intercept.js index 5068ff5..dda01e7 100644 --- a/dist/src/network/intercept.js +++ b/dist/src/network/intercept.js @@ -36,6 +36,7 @@ function isBotMsg(msg, sentByMe) { return false; let didEmit = false; if (txt && txt.startsWith('/bot ')) { + console.log("BOT: /bot command detected"); builtin_1.builtinBotEmit(msg); didEmit = true; } diff --git a/dist/src/network/intercept.js.map b/dist/src/network/intercept.js.map index 106f57e..2f09445 100644 --- a/dist/src/network/intercept.js.map +++ b/dist/src/network/intercept.js.map @@ -1 +1 @@ -{"version":3,"file":"intercept.js","sourceRoot":"","sources":["../../../src/network/intercept.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,sCAAkC;AAClC,wCAA2C;AAC3C,8CAAoE;AACpE,wCAAuC;AACvC,4CAAoC;AAEpC;;;EAGE;AAEF,kDAAkD;AAClD,SAAsB,QAAQ,CAAC,GAAQ,EAAE,QAAiB;;QACxD,MAAM,GAAG,GAAG,GAAG,CAAC,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC,OAAO,CAAA;QAE9C,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,CAAA;QACxB,IAAI,OAAO,KAAK,mBAAS,CAAC,aAAa,CAAC,OAAO,EAAE;YAC/C,OAAO,KAAK,CAAA,CAAC,sCAAsC;SACpD;QACD,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,CAAA;QACtC,IAAG,CAAC,IAAI;YAAE,OAAO,KAAK,CAAA;QAEtB,MAAM,IAAI,GAAG,MAAM,eAAM,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AC;CAAA"} \ No newline at end of file +{"version":3,"file":"intercept.js","sourceRoot":"","sources":["../../../src/network/intercept.ts"],"names":[],"mappings":";;;;;;;;;;;AACA,sCAAkC;AAClC,wCAA2C;AAC3C,8CAAoE;AACpE,wCAAuC;AACvC,4CAAoC;AAEpC;;;EAGE;AAEF,kDAAkD;AAClD,SAAsB,QAAQ,CAAC,GAAQ,EAAE,QAAiB;;QACxD,MAAM,GAAG,GAAG,GAAG,CAAC,OAAO,IAAI,GAAG,CAAC,OAAO,CAAC,OAAO,CAAA;QAE9C,MAAM,OAAO,GAAG,GAAG,CAAC,IAAI,CAAA;QACxB,IAAI,OAAO,KAAK,mBAAS,CAAC,aAAa,CAAC,OAAO,EAAE;YAC/C,OAAO,KAAK,CAAA,CAAC,sCAAsC;SACpD;QACD,MAAM,IAAI,GAAG,GAAG,CAAC,IAAI,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,CAAA;QACtC,IAAG,CAAC,IAAI;YAAE,OAAO,KAAK,CAAA;QAEtB,MAAM,IAAI,GAAG,MAAM,eAAM,CAAC,IAAI,CAAC,OAAO,CAAC;YACrC,KAAK,EAAE,EAAC,IAAI,EAAC;SACd,CAAC,CAAA;QACF,IAAI,CAAC,IAAI;YAAE,OAAO,KAAK,CAAA;QAEvB,IAAI,OAAO,GAAG,KAAK,CAAA;QAEnB,IAAI,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE;YAClC,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAA;YACzC,wBAAc,CAAC,GAAG,CAAC,CAAA;YACnB,OAAO,GAAG,IAAI,CAAA;SACf;QACD,IAAI,OAAO;YAAE,OAAO,OAAO,CAAA;QAE3B,MAAM,WAAW,GAAG,MAAM,eAAM,CAAC,OAAO,CAAC,OAAO,CAAC;YAC/C,KAAK,EAAE;gBACL,MAAM,EAAE,IAAI,CAAC,EAAE;aAChB;SACF,CAAC,CAAA;QACF,6CAA6C;QAE7C,IAAI,C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C,CAAA;gBACnB,OAAO,IAAI,CAAA;YACb,KAAK,mBAAS,CAAC,SAAS,CAAC,KAAK;gBAC5B,MAAM,GAAG,GAAG,MAAM,eAAM,CAAC,GAAG,CAAC,OAAO,CAAC;oBACnC,KAAK,EAAE;wBACL,IAAI,EAAE,UAAU,CAAC,OAAO;qBACzB;iBACF,CAAC,CAAA;gBACF,OAAO,sBAAe,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAA;YAC9D,KAAK,mBAAS,CAAC,SAAS,CAAC,MAAM;gBAC7B,OAAO,oBAAa,CAAC,GAAG,EAAE,UAAU,CAAC,CAAA;YACvC;gBACE,OAAO,KAAK,CAAA;SACf;IACH,CAAC;CAAA;AAED,SAAe,YAAY,CAAC,KAAK,EAAE,QAAQ;;QACzC,KAAK,IAAI,KAAK,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE;YACjD,MAAM,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC;SAC5C;IACH,CAAC;CAAA"} \ No newline at end of file diff --git a/src/builtin/index.ts b/src/builtin/index.ts index c2fdcbd..563130a 100644 --- a/src/builtin/index.ts +++ b/src/builtin/index.ts @@ -24,6 +24,7 @@ async function init(){ function builtinBotEmit(msg:Msg){ setTimeout(()=>{ + console.log("BUILT IN BOT EMIT",buildBotPayload(msg)) SphinxBot._emit('message', buildBotPayload(msg)) },1200) } diff --git a/src/network/intercept.ts b/src/network/intercept.ts index 0b1f121..1419b85 100644 --- a/src/network/intercept.ts +++ b/src/network/intercept.ts @@ -29,6 +29,7 @@ export async function isBotMsg(msg: Msg, sentByMe: boolean): Promise { let didEmit = false if (txt && txt.startsWith('/bot ')) { + console.log("BOT: /bot command detected") builtinBotEmit(msg) didEmit = true }