Guest User

Untitled

a guest
Jul 27th, 2020
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.51 KB | None | 0 0
  1. @bot.message_handler(content_types=['text'])
  2. def send_text1(message):
  3. if message.text == '5 клас':
  4. bot.send_message(message.chat.id, 'Выбери свой класс! Что бы узнать росписание и т.д: ', reply_markup=markup5)
  5.  
  6. if message.text == '5-А':
  7. bot.send_message(message.chat.id, 'Выбери что хочешь посмотреть:', reply_markup=markup)
  8.  
  9. if message.text == 'Розклад на сьогодні':
  10. today = datetime.now().isoweekday() - 1
  11. bot.send_message(message.chat.id, class5A[today])
  12.  
  13. if message.text == 'Розклад на тиждень':
  14. bot.send_message(message.chat.id, "Выбери день:", reply_markup=markup2)
  15.  
  16. if message.text in days:
  17. day = days.index(message.text)
  18. bot.send_message(message.chat.id, f"Розклад на {message.text}\n" + class5A[day])
  19.  
  20. if message.text == "Время до звонка":
  21. time_to_bell(message)
  22.  
  23. if message.text == "Отмена..":
  24. bot.send_message(message.chat.id, "Меню:", reply_markup=markup_class)
  25.  
  26. if message.text == "Отмена.":
  27. bot.send_message(message.chat.id, "Меню:", reply_markup=markup5)
  28.  
  29. if message.text == "Отмена":
  30. bot.send_message(message.chat.id, "Меню:", reply_markup=markup)
  31.  
  32. @bot.message_handler(content_types=['text'])
  33. def send2(message):
  34. if message.text == '5 клас':
  35. bot.send_message(message.chat.id, 'Выбери свой класс! Что бы узнать росписание и т.д: ', reply_markup=markup5)
  36.  
  37. if message.text == '5-Б':
  38. bot.send_message(message.chat.id, 'Выбери что хочешь посмотреть:', reply_markup=markup)
  39.  
  40. if message.text == 'Розклад на сьогодні':
  41. today = datetime.now().isoweekday() - 1
  42. bot.send_message(message.chat.id, class5A[today])
  43.  
  44. if message.text == 'Розклад на тиждень':
  45. bot.send_message(message.chat.id, "Выбери день:", reply_markup=markup2)
  46.  
  47. if message.text in days:
  48. day = days.index(message.text)
  49. bot.send_message(message.chat.id, f"Розклад на {message.text}\n" + class5A[day])
  50.  
  51. if message.text == "Время до звонка":
  52. time_to_bell(message)
  53.  
  54. if message.text == "Отмена..":
  55. bot.send_message(message.chat.id, "Меню:", reply_markup=markup_class)
  56.  
  57. if message.text == "Отмена.":
  58. bot.send_message(message.chat.id, "Меню:", reply_markup=markup5)
  59.  
  60. if message.text == "Отмена":
  61. bot.send_message(message.chat.id, "Меню:", reply_markup=markup)
Advertisement
Add Comment
Please, Sign In to add comment