This commit is contained in:
emmatveev 2024-03-07 20:00:02 +03:00
parent 7c730cd831
commit c3bccf0c71

View File

@ -10,7 +10,7 @@ def update():
while True:
if client.get_config('updater')['enabled']:
fltr = {"last_time_updated": {"$lte": datetime.datetime.now() - datetime.timedelta(seconds=client.get_config('updater')['seconds_delay'])}}
if client.get_config('updater')['send_to_single']:
if not client.get_config('updater')['send_to_single']:
fltr["chat_id"] = {"$lt": 0}
for chat in mongo.chats_collection.find(fltr):
users = list(mongo.counter_collection.find({"chat_id": chat['chat_id'], 'username': {"$ne": None}}))