d_skat

Untitled

May 11th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.56 KB | None | 0 0
  1. def menu(chat_id, text, update_id):
  2.  
  3.     commands = ['новости', 'погода']
  4.     welcome_note(chat_id, commands)
  5.  
  6.     while(text.lower() == 'начать!'):
  7.         chat_id, text, update_id = get_last_id_text(get_updates(update_id+1))
  8.         sleep(0.5)
  9.  
  10.     while text.lower() not in commands:
  11.         chat_id, text, update_id = get_last_id_text(get_updates(update_id+1))
  12.         sleep(0.5)
  13.  
  14.     if text.lower() == 'новости':
  15.         news(chat_id, update_id)
  16.  
  17.     elif text.lower() == 'погода':
  18.         weather(chat_id, update_id)
Advertisement
Add Comment
Please, Sign In to add comment