From df193da779707ce75c18a986cb7a14311d97bbb7 Mon Sep 17 00:00:00 2001 From: jay Date: Thu, 6 May 2021 13:15:38 +0500 Subject: [PATCH] feat(command): :construction: add stub for `bot._client` events Not sure how these are different: - `bot._client.on("chat")` - `bot.on("message(str)")` --- lib/plugins/command.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/plugins/command.js b/lib/plugins/command.js index 20b485c..2262f17 100644 --- a/lib/plugins/command.js +++ b/lib/plugins/command.js @@ -79,7 +79,7 @@ function commandWeb([[mode, username, message]]) { } function _clientSystemMessage(...args) { - console.log("cmd msg:", args[0]?.message, args[0]?.extra?.length, args[0]?.extra, args[0], args.slice(1)) + console.log("cmd chat:", args[0]?.message, args[0]?.extra?.length, args[0]?.extra, args[0], args.slice(1)) } const events_registered = [] @@ -545,6 +545,8 @@ const load = (config) => { bot.on(key, fn) ) } + + // bot._client.on("chat", _clientSystemMessage) } const unload = () => { @@ -554,6 +556,8 @@ const unload = () => { events_registered.shift() } console.log("events_registered:", bot._eventsCount) + + // bot._client.off("chat", _clientSystemMessage) } module.exports = { load, unload, events_registered, command } \ No newline at end of file