Nice v2
This commit is contained in:
parent
07fced7ae8
commit
2522c54188
7
index.js
7
index.js
|
@ -628,11 +628,10 @@ async function processKarma(msg, match, settings={}) {
|
||||||
$inc: {karmaChanged: 1}
|
$inc: {karmaChanged: 1}
|
||||||
}
|
}
|
||||||
).exec()
|
).exec()
|
||||||
let nice = ""
|
|
||||||
if (toDB.karma + updateValue == 69) {
|
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)
|
console.log(message)
|
||||||
bot.sendMessage(chat_id, message, {parse_mode: "MarkdownV2"})
|
bot.sendMessage(chat_id, message, {parse_mode: "MarkdownV2"})
|
||||||
}
|
}
|
||||||
|
@ -663,4 +662,4 @@ async function updateDB(id) {
|
||||||
|
|
||||||
function sleep(ms) {
|
function sleep(ms) {
|
||||||
return new Promise(resolve => setTimeout(resolve, ms));
|
return new Promise(resolve => setTimeout(resolve, ms));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue