percent
This commit is contained in:
parent
39d79e3ca5
commit
373aeb1043
3
main.py
3
main.py
@ -78,8 +78,9 @@ def set_probability(message: Message):
|
||||
bot.send_message(message.chat.id, "В этом чате я пока никому не парировал")
|
||||
return
|
||||
text = "Вот кому я парировал:\n"
|
||||
total = mongo.counter_collection.count_documents({"chat_id": message.chat.id})
|
||||
for index, value in enumerate(rating):
|
||||
text += f"{index + 1}. @{value['username']} - {value['count']}\n"
|
||||
text += f"{index + 1}. @{value['username']} - {value['count']} ({int(value['count'] / total * 100)})%\n"
|
||||
bot.send_message(message.chat.id, text)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user