Exemplo n.º 1
0
def troubleshoot(recipient_id, data):
    fbutil.send_bubbles(recipient_id)

    data = json.dumps({
        "recipient": {
            "id": recipient_id
        },
        "message": {
            "text": data['result']['fulfillment']['speech']
        }
    })
    utils.post_messenger(data)

    fbutil.send_bubbles(recipient_id)
    fbutil.send_message(recipient_id, "This is a troubleshooting guide for those who are experiencing a slow internet connection. Please follow every step that I will give.")
    fbutil.send_bubbles(recipient_id)
    fbutil.send_message(recipient_id, "First, connect your computer to your modem with an Ethernet cable as shown below.")
    fbutil.send_bubbles(recipient_id)
    fbutil.send_image(recipient_id, "http://www.centurylink.com/help/images/uploads/194_wiredconnection.png")
    fbutil.send_bubbles(recipient_id)
    fbutil.send_message(recipient_id, "Next is try to disconnect and power down all devices that access the Internet like other computers, gaming systems, Netflix or other movie streaming devices, DVRs, other routers, switches, VoIP phones, mobile phones and wireless printers.")
    fbutil.send_bubbles(recipient_id)
    fbutil.send_bubbles(recipient_id)
    fbutil.send_link(recipient_id, "Run a speedtest with...",  "http://speedtest.net", "Speedtest")
    fbutil.send_bubbles(recipient_id)
    fbutil.send_message(recipient_id, "Write down the date, time, and your results each time you run a test.")
    fbutil.send_bubbles(recipient_id)
    fbutil.send_message(recipient_id, "Compare your results against the table below. Are your speeds lower than or at/above the Target Download Speed?")
    fbutil.send_bubbles(recipient_id)
    fbutil.send_message(recipient_id, "If your speedtest was at at or above the Target Download Speed, then you're receiving your subscribed speed. For example, if you've purchased a CenturyLink Internet package with 1.5 Mbps speed, your Target Download Speed shouldn't be lower than 1.2 Mbps.")
    fbutil.send_bubbles(recipient_id)
    fbutil.send_message(recipient_id, "Bad wiring can also cause slow connections so you better check it.")

    data = json.dumps({
        "recipient": {
            "id": recipient_id
        },
        "message":{
            "attachment":{
                "type":"template",
                "payload":{
                    "template_type":"button",
                    "text":"Is your internet connection still slow?",
                    "buttons":[
                        {
                            "type":"postback",
                            "title":"Yes",
                            "payload": "trblsht_yes"
                        },
                        {
                            "type":"postback",
                            "title":"No",
                            "payload":"trblsht_no"
                        }
                    ]
                }
            }
        }
    })
    utils.post_messenger(data)
Exemplo n.º 2
0
def unknown(recipient_id, data):
    fbutil.send_bubbles(recipient_id)
    data = json.dumps({
        "recipient": {
            "id": recipient_id
        },
        "message": {
            "text": data['result']['fulfillment']['speech']
        }
    })
    utils.post_messenger(data)
Exemplo n.º 3
0
def send_recent_bill(recipient_id, data):

    fbutil.send_bubbles(recipient_id)

    data = json.dumps({
        "recipient": {
            "id": recipient_id
        },
        "message": {
            "text": data['result']['fulfillment']['speech']
        }
    })
    utils.post_messenger(data)
    fbutil.send_file(recipient_id, "https://www.pdf-archive.com/2016/11/12/bill1116/bill1116.pdf")
Exemplo n.º 4
0
def tell_product(recipient_id, data):
    fbutil.send_bubbles(recipient_id)

    data = json.dumps({
        "recipient": {
            "id": recipient_id
        },
        "message":{
            "attachment":{
                "type":"template",
                "payload":{
                    "template_type":"button",
                    "text":"Okay. Which product are you interested about?",
                    "buttons":[
                        {
                            "type":"postback",
                            "title":"Home Fiber Plan 2899",
                            "payload": "promo_1"
                        },
                        {
                            "type":"postback",
                            "title":"Speedster Plan 1899",
                            "payload":"promo_2"
                        },
                         {
                            "type":"postback",
                            "title":"Fun Plan 699",
                            "payload":"promo_3"
                        }
                    ]
                }
            }
        }
    })

    utils.post_messenger(data)