diff --git a/main.py b/main.py index f248053..47c4cc5 100644 --- a/main.py +++ b/main.py @@ -77,7 +77,7 @@ def point(message: Message): @bot.message_handler(commands=['pointers']) def pointers(message: Message): - rating = list(mongo.counter_collection.find({"chat_id": message.chat.id}).sort("points", -1)) + rating = list(mongo.counter_collection.find({"chat_id": message.chat.id, "points": {"$exists": True}}).sort("points", -1)) if not rating: bot.send_message(message.chat.id, "Ебаллы пока никому не начислялись") return