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