From b32f92e511d13c352651189aea5c519dd36bfecd Mon Sep 17 00:00:00 2001 From: Vlad Rud Date: Wed, 7 Jul 2021 19:57:25 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9D=D0=B5=20=D0=BF=D0=BE=D0=BA=D0=B0=D0=B7?= =?UTF-8?q?=D1=8B=D0=B2=D0=B0=D0=B5=D0=BC=20=D1=81=D0=BF=D0=B8=D1=81=D0=BE?= =?UTF-8?q?=D0=BA=20=D0=BB=D1=8E=D0=B4=D0=B5=D0=B9=20=D1=81=20=D0=BD=D1=83?= =?UTF-8?q?=D0=BB=D0=B5=D0=B2=D0=BE=D0=B9=20=D0=BA=D0=B0=D1=80=D0=BC=D0=BE?= =?UTF-8?q?=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/index.js b/index.js index 54d25f2..f872b2f 100644 --- a/index.js +++ b/index.js @@ -420,7 +420,7 @@ bot.onText(/^\/stats/, async msg => { const lessKarma = await User.countDocuments({karma: {$gt: user.karma}}) const sameKarma = await User.find({karma: user.karma}) let sameMessage = "" - if(sameKarma.length > 1) { + if(user.karma != 0 && sameKarma.length > 1) { sameMessage = "\nТы делишь его с:\n" let i = 0; for(let same of sameKarma) { @@ -440,7 +440,6 @@ bot.onText(/^\/stats/, async msg => { Вот информация о тебе, *${markdowned(user.full_name)}*: Карма: *${markdowned(user.karma)}* -Место среди пользователей: *${lessKarma+1}* ${sameMessage} Количество сообщений: *${user.messagesCount}* Сколько раз менял карму: *${user.karmaChanged}* Сколько раз получал карму: *${user.karmaGot}*