add random choise in dick change random words
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
1b868e430b
commit
bcc5f68151
@ -2,6 +2,7 @@ from aiogram import types, Dispatcher
|
||||
from sqlalchemy.orm.session import close_all_sessions
|
||||
from create_bot import bot, dp
|
||||
from sqdb import user, session
|
||||
import random
|
||||
from random import randint
|
||||
import datetime
|
||||
|
||||
@ -12,10 +13,10 @@ async def up_dick(message: types.Message):
|
||||
# рандомайзер
|
||||
numb = randint(-6,10)
|
||||
global size_change, dick_plus, dick_minus
|
||||
dick_plus = f'<b>вырос</b> 🚀 на <b>{numb}</b> см!'
|
||||
dick_minus = f'<b>уменьшился</b> ✂ на <b>{abs(numb)}</b> см!'
|
||||
dick_plus = ['<b>вырос</b>', '<b>подрос</b>']
|
||||
dick_minus = '<b>уменьшился</b> ✂'
|
||||
if numb > 0:
|
||||
size_change = dick_plus
|
||||
size_change = random.choice(dick_plus) + '🚀'
|
||||
else: size_change = dick_minus
|
||||
|
||||
|
||||
@ -36,7 +37,7 @@ async def up_dick(message: types.Message):
|
||||
session.rollback()
|
||||
finally:
|
||||
session.close_all()
|
||||
print('пользвоатель уже крутил')
|
||||
print('пользователь уже крутил')
|
||||
|
||||
else:
|
||||
try:
|
||||
@ -47,7 +48,8 @@ async def up_dick(message: types.Message):
|
||||
session.commit() #обновляет запись
|
||||
|
||||
|
||||
await bot.send_message(message.chat.id, f'@{message.from_user.username}, ваш писюн {size_change}\n\
|
||||
await bot.send_message(message.chat.id, f'@{message.from_user.username}, ваш писюн {size_change}\
|
||||
на <b>{abs(numb)}</b> см!\n\
|
||||
Теперь он равен <b>{updetedDick}</b> см! ')
|
||||
except:
|
||||
session.rollback()
|
||||
@ -70,6 +72,7 @@ async def up_dick(message: types.Message):
|
||||
session.close()
|
||||
|
||||
await bot.send_message(message.chat.id, f'@{message.from_user.username}, ваш писюн {size_change}\n\
|
||||
на <b>{abs(numb)}</b> см!\n\
|
||||
Теперь он равен <b>{numb}</b> см!')
|
||||
except:
|
||||
print('ошибка в добавлении нового пользователя')
|
||||
|
Loading…
Reference in New Issue
Block a user