FlyWithMe

Untitled

Jan 27th, 2021
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.45 KB | None | 0 0
  1. def order_price(update, context):
  2.     price_of_order = update.message.text
  3.     try:
  4.         int(price_of_order)
  5.         context.user_data['order']['scale'] = int(price_of_order)
  6.         update.message.reply_text(f'Сторимость уборки составляет {int(price_of_order) * 11}')
  7.         return "comment"
  8.     except (TypeError, ValueError):
  9.         update.message.reply_text("Введите целое число")
  10.         return "scale"
Advertisement
Add Comment
Please, Sign In to add comment