From d77fc978a07daea763ef84130e500539fd0269f6 Mon Sep 17 00:00:00 2001 From: Karl Date: Wed, 1 Jul 2020 18:13:04 +0000 Subject: [PATCH] update --- app.js | 4 ++-- data/bot/lib/common.js | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app.js b/app.js index cadf549..0a57c8f 100644 --- a/app.js +++ b/app.js @@ -62,13 +62,13 @@ bot.on('message', (msg) => { for (const x of jointArray) { if (msg.text && msg.text.toString() === x.NAME) { - common.chat(bot, msg, x.NAME) + common.chat(bot, msg, x.NAME, logger) } } for (const x of commands) { if (msg.text && msg.text.toString().includes(x.NAME)) { - common.commands(bot, msg, x.NAME) + common.commands(bot, msg, x.NAME, logger) } } diff --git a/data/bot/lib/common.js b/data/bot/lib/common.js index 0bbadb2..c00d0a0 100644 --- a/data/bot/lib/common.js +++ b/data/bot/lib/common.js @@ -2,6 +2,7 @@ const decache = require('decache'); module.exports = { commands: async (bot, msg, input) => { + logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " did - " + input); const userMention = "@" + msg.from.first_name + "<\/a> " let commands = require('../../group/commands') for (const x of commands) { @@ -18,6 +19,7 @@ module.exports = { } }, chat: async (bot, msg, input) => { + logger.info("ID - " + msg.from.id + " First Name - " + msg.from.first_name + " asked - " + input); const userMention = "@" + msg.from.first_name + "<\/a> " let commands = require('../../group/commands') let navigation = require('../../group/FAQ')