From 07fced7ae8a772f418afc0ab58b589249c30e75f Mon Sep 17 00:00:00 2001 From: Nefrace Date: Sun, 6 Jun 2021 23:54:37 +0300 Subject: [PATCH] Nice. --- index.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 2a9f99e..2819b3f 100644 --- a/index.js +++ b/index.js @@ -628,7 +628,11 @@ async function processKarma(msg, match, settings={}) { $inc: {karmaChanged: 1} } ).exec() - const message = `*${markdowned(fromDB.full_name)} \\(${markdowned(fromDB.karma)}\\)* ${changeMessage} карму *${markdowned(toDB.full_name)} \\(${markdowned(toDB.karma + updateValue)}\\)*` + let nice = "" + if (toDB.karma + updateValue == 69) { + nice = "\n*Nice\\.*" + } + const message = `*${markdowned(fromDB.full_name)} \\(${markdowned(fromDB.karma)}\\)* ${changeMessage} карму *${markdowned(toDB.full_name)} \\(${markdowned(toDB.karma + updateValue)}\\)* ${nice}` console.log(message) bot.sendMessage(chat_id, message, {parse_mode: "MarkdownV2"}) }