Debugging print of messages
This commit is contained in:
parent
4e380f7286
commit
192642383a
3
index.js
3
index.js
|
@ -592,8 +592,9 @@ async function processKarma(msg, match, settings={}) {
|
||||||
console.log("FOUND SHOT: ")
|
console.log("FOUND SHOT: ")
|
||||||
console.log({carmaShot})
|
console.log({carmaShot})
|
||||||
if (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})
|
const messages = await Trigger.find({trigger:trigger, show: true})
|
||||||
|
console.log({messages})
|
||||||
const message = messages[getRandomInt(0, messages.length)].text
|
const message = messages[getRandomInt(0, messages.length)].text
|
||||||
bot.sendMessage(chat_id, message, {reply_to_message_id: msg.message_id})
|
bot.sendMessage(chat_id, message, {reply_to_message_id: msg.message_id})
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue