From 192642383aa5bb3e4df9850ca3056dacfa925070 Mon Sep 17 00:00:00 2001 From: Vlad Rud Date: Mon, 16 Aug 2021 20:57:16 +0300 Subject: [PATCH] Debugging print of messages --- index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 3b594b5..26c5e63 100644 --- a/index.js +++ b/index.js @@ -592,8 +592,9 @@ async function processKarma(msg, match, settings={}) { console.log("FOUND SHOT: ") console.log({carmaShot}) if (carmaShot) { - let trigger = 'tooFast' + updateValue > 0 ? "Plus" : "Minus" + const trigger = `tooFast${updateValue > 0 ? "Plus" : "Minus"}` const messages = await Trigger.find({trigger:trigger, show: true}) + console.log({messages}) const message = messages[getRandomInt(0, messages.length)].text bot.sendMessage(chat_id, message, {reply_to_message_id: msg.message_id}) return