Charles Stein Charles Stein - 1 month ago 26
Node.js Question

Send quick reply without using watterfall in Microsoft Bot Framework

I am using microsoft bot framework and I want to send quick replies, but I dont want to use watterfall, I want it to be handled by luis, how can I set the quick replies for a message using node sdk?

Answer

Here it is how it is done, you have to add it to source event, I found it here https://github.com/Microsoft/BotBuilder-Samples/blob/master/Node/core-ChannelData/app.js#L92

 let message = new builder.Message(session)
            .text("Hello")
            .sourceEvent({
                facebook: {
                    "quick_replies": [
                        {
                            "content_type": "text",
                            "title": "Weather",
                            "payload": "Weather"
                        },
                        {
                            "content_type": "text",
                            "title": "Forecast",
                            "payload": "Forecast"
                        }
                    ]
                }
            })
session.send(message)