def handle_incoming_messages(): try: data = request.json sender = data['entry'][0]['messaging'][0]['sender']['id'] message = data['entry'][0]['messaging'][0]['message']['text'] reply(sender, jarvis.do(message)) except: pass return "ok"
#!/usr/bin/env python import jarvis while 1: print jarvis.do(raw_input("> "))