now we counting
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Simple_Not 2023-07-12 22:40:45 +10:00
parent 40927b95cc
commit 9f27070585

View File

@ -68,6 +68,7 @@ async def up_dick(message: types.Message):
updetedDick = user["dick_size"] + numb updetedDick = user["dick_size"] + numb
try: try:
dt = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
metadata = dicks_collection.insert( metadata = dicks_collection.insert(
{ {
'_key': user['_key'], '_key': user['_key'],
@ -77,6 +78,7 @@ async def up_dick(message: types.Message):
'user_fullname': user['user_fullname'], 'user_fullname': user['user_fullname'],
'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,
'chat_id': message.chat.id 'chat_id': message.chat.id
}, },
overwrite_mode='update' overwrite_mode='update'
@ -94,6 +96,27 @@ async def up_dick(message: types.Message):
# Теперь он равен <b>{updetedDick}</b> см! ') # Теперь он равен <b>{updetedDick}</b> см! ')
else: else:
await bot.send_message(message.chat.id, f'@{message.from_user.username},🚫 вы уже крутили пипису, ее размер <b>{user["dick_size"]}</b> см! ') await bot.send_message(message.chat.id, f'@{message.from_user.username},🚫 вы уже крутили пипису, ее размер <b>{user["dick_size"]}</b> см! ')
try:
metadata = dicks_collection.insert(
{
'_key': user['_key'],
'_id': user['_id'],
'_rev': user['_rev'],
'user_id': user['attempts'] ,
'user_fullname': user['user_fullname'],
'dick_size': user['attempts'] ,
'datetimes': user['datetimes'] ,
'attempts': user['attempts'] + 1,
'chat_id': user['chat_id']
},
overwrite_mode='update'
)
print(f'Успешно апдейтнули попытку крутить пипису @{message.from_user.username}')
except Exception as e2:
print(f'ошибка в обновлении попытки крутить пипису @{message.from_user.username}')
print(e2)
print(f'пользователь @{message.from_user.username} уже крутил') print(f'пользователь @{message.from_user.username} уже крутил')
else: else:
@ -105,6 +128,7 @@ async def up_dick(message: types.Message):
'user_fullname': message.from_user.full_name, 'user_fullname': message.from_user.full_name,
'dick_size': numb, 'dick_size': numb,
'datetimes': datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"), 'datetimes': datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
'attempts': 1,
'chat_id': message.chat.id 'chat_id': message.chat.id
} }