bring dick back.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Simple_Not 2023-07-12 21:58:19 +10:00
parent e93d2c0ef7
commit 25e82e28d5

View File

@ -47,15 +47,17 @@ async def up_dick(message: types.Message):
try: 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: if candidate_cursor.count() > 0:
## Если есть то нарастить и отправить сообщение ## Если есть то нарастить и отправить сообщение
print(11111)
user = candidate_cursor.pop()
print(user) user = candidate_cursor.pop()
print(user['datetimes'])
last_time = datetime.datetime.strptime(user['datetimes'], '%Y-%m-%d %H:%M:%S') 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) 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 updetedDick = user["dick_size"] + numb
try: 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( metadata = dicks_collection.insert(
{ {
'_key': user['_key'], '_key': user['_key'],