This commit is contained in:
emmatveev 2024-05-18 10:39:03 +03:00
parent 0df4950b8e
commit 4a077e1db9

View File

@ -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