Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def menu(chat_id, text, update_id):
- commands = ['новости', 'погода']
- welcome_note(chat_id, commands)
- while(text.lower() == 'начать!'):
- chat_id, text, update_id = get_last_id_text(get_updates(update_id+1))
- sleep(0.5)
- while text.lower() not in commands:
- chat_id, text, update_id = get_last_id_text(get_updates(update_id+1))
- sleep(0.5)
- if text.lower() == 'новости':
- news(chat_id, update_id)
- elif text.lower() == 'погода':
- weather(chat_id, update_id)
Advertisement
Add Comment
Please, Sign In to add comment