From 25e82e28d58ce337c7a283b3143dbdb42dbea7f2 Mon Sep 17 00:00:00 2001 From: Simple_Not <44047940+moonbaseDelta@users.noreply.github.com> Date: Wed, 12 Jul 2023 21:58:19 +1000 Subject: [PATCH] bring dick back. --- handlers/pipisa.py | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/handlers/pipisa.py b/handlers/pipisa.py index f1ad5af..e5af71b 100644 --- a/handlers/pipisa.py +++ b/handlers/pipisa.py @@ -47,15 +47,17 @@ async def up_dick(message: types.Message): try: #### Чекнуть есть ли юзер в базе - candidate_cursor = dicks_collection.find({'user_id': message.from_user.id}, skip=0, limit=1488) + candidate_cursor = dicks_collection.find( + { + 'user_id': message.from_user.id, + 'chat_id': message.chat.id + }, + skip=0, limit=1488) if candidate_cursor.count() > 0: ## Если есть то нарастить и отправить сообщение - print(11111) - user = candidate_cursor.pop() - print(user) - print(user['datetimes']) + user = candidate_cursor.pop() last_time = datetime.datetime.strptime(user['datetimes'], '%Y-%m-%d %H:%M:%S') time_to_grow = datetime.datetime.now().replace(hour=14, minute=8, second=8, microsecond=0) @@ -65,10 +67,6 @@ async def up_dick(message: types.Message): updetedDick = user["dick_size"] + numb try: - # metadata = dicks_collection.update_match( - # {'user_id': message.from_user.id, 'chat_it': message.chat.id}, - # {'dick_size': updetedDick, 'datetimes': datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")} - # ) metadata = dicks_collection.insert( { '_key': user['_key'],