forked from Pavel_Durov/python_bot
now we counting
This commit is contained in:
parent
40927b95cc
commit
9f27070585
@ -68,6 +68,7 @@ async def up_dick(message: types.Message):
|
||||
|
||||
updetedDick = user["dick_size"] + numb
|
||||
try:
|
||||
dt = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
||||
metadata = dicks_collection.insert(
|
||||
{
|
||||
'_key': user['_key'],
|
||||
@ -77,6 +78,7 @@ async def up_dick(message: types.Message):
|
||||
'user_fullname': user['user_fullname'],
|
||||
'dick_size': updetedDick,
|
||||
'datetimes': datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
|
||||
'attempts': user['attempts'] + 1,
|
||||
'chat_id': message.chat.id
|
||||
},
|
||||
overwrite_mode='update'
|
||||
@ -94,6 +96,27 @@ async def up_dick(message: types.Message):
|
||||
# Теперь он равен <b>{updetedDick}</b> см! ')
|
||||
else:
|
||||
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} уже крутил')
|
||||
|
||||
else:
|
||||
@ -105,6 +128,7 @@ async def up_dick(message: types.Message):
|
||||
'user_fullname': message.from_user.full_name,
|
||||
'dick_size': numb,
|
||||
'datetimes': datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S"),
|
||||
'attempts': 1,
|
||||
'chat_id': message.chat.id
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user