This commit is contained in:
Nefrace 2021-06-06 23:54:37 +03:00
parent 92ca4b188b
commit 07fced7ae8
1 changed files with 5 additions and 1 deletions

View File

@ -628,7 +628,11 @@ async function processKarma(msg, match, settings={}) {
$inc: {karmaChanged: 1} $inc: {karmaChanged: 1}
} }
).exec() ).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) console.log(message)
bot.sendMessage(chat_id, message, {parse_mode: "MarkdownV2"}) bot.sendMessage(chat_id, message, {parse_mode: "MarkdownV2"})
} }