From 2522c54188c164b32261f7a2ffbd4add5673c8ff Mon Sep 17 00:00:00 2001 From: Vlad Rud Date: Mon, 7 Jun 2021 17:14:10 +0300 Subject: [PATCH] Nice v2 --- index.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 2819b3f..54d25f2 100644 --- a/index.js +++ b/index.js @@ -628,11 +628,10 @@ async function processKarma(msg, match, settings={}) { $inc: {karmaChanged: 1} } ).exec() - let nice = "" if (toDB.karma + updateValue == 69) { - nice = "\n*Nice\\.*" + bot.sendMessage(chat_id, "Nice.") } - const message = `*${markdowned(fromDB.full_name)} \\(${markdowned(fromDB.karma)}\\)* ${changeMessage} карму *${markdowned(toDB.full_name)} \\(${markdowned(toDB.karma + updateValue)}\\)* ${nice}` + const message = `*${markdowned(fromDB.full_name)} \\(${markdowned(fromDB.karma)}\\)* ${changeMessage} карму *${markdowned(toDB.full_name)} \\(${markdowned(toDB.karma + updateValue)}\\)*` console.log(message) bot.sendMessage(chat_id, message, {parse_mode: "MarkdownV2"}) } @@ -663,4 +662,4 @@ async function updateDB(id) { function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)); -} \ No newline at end of file +}