Exemple #1
0
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"
Exemple #2
0
#!/usr/bin/env python

import jarvis

while 1:
    print jarvis.do(raw_input("> "))