now we counting

This commit is contained in:
Simple_Not 2023-07-13 01:00:50 +10:00
parent 53c48dbb44
commit 3f04de5cb1

View File

@ -55,6 +55,15 @@ async def up_dick(message: types.Message):
}, },
skip=0, limit=1488) skip=0, limit=1488)
# a = dicks_collection.find( { 'user_id': 317051301, 'chat_id': 317051301 }, skip=0, limit=1488)
# print({
# 'user_id': message.from_user.id,
# 'chat_id': message.chat.id
# })
# print( candidate_cursor.count() )
# asdf = candidate_cursor.batch()
# print(asdf)
if candidate_cursor.count() > 0: if candidate_cursor.count() > 0:
## Если есть то нарастить и отправить сообщение ## Если есть то нарастить и отправить сообщение
@ -72,10 +81,10 @@ async def up_dick(message: types.Message):
metadata = dicks_collection.insert( metadata = dicks_collection.insert(
{ {
'_key': user['_key'], '_key': user['_key'],
'_id': user['_id'], #'_id': user['_id'],
#'_rev': user['_rev'], #'_rev': user['_rev'],
'user_id': message.from_user.id, 'user_id': user['user_id'],
'user_fullname': user['user_fullname'], 'user_fullname': message.from_user.full_name,
'dick_size': updetedDick, 'dick_size': updetedDick,
'datetimes': datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"), 'datetimes': datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
'attempts': user['attempts'] + 1, 'attempts': user['attempts'] + 1,
@ -101,11 +110,11 @@ async def up_dick(message: types.Message):
metadata = dicks_collection.insert( metadata = dicks_collection.insert(
{ {
'_key': user['_key'], '_key': user['_key'],
'_id': user['_id'], #'_id': user['_id'],
#'_rev': user['_rev'], #'_rev': user['_rev'],
'user_id': user['attempts'] , 'user_id': user['user_id'] ,
'user_fullname': user['user_fullname'], 'user_fullname': message.from_user.full_name,
'dick_size': user['attempts'] , 'dick_size': user['dick_size'] ,
'datetimes': user['datetimes'] , 'datetimes': user['datetimes'] ,
'attempts': user['attempts'] + 1, 'attempts': user['attempts'] + 1,
'chat_id': message.chat.id 'chat_id': message.chat.id