dialogflow / dialogflow-fulfillment-nodejs

Dialogflow agent fulfillment library supporting v1&v2, 8 platforms, and text, card, image, suggestion, custom responses
Apache License 2.0
597 stars 282 forks source link

DialogFlow website chatbot (Quick replies) is not working #350

Open hammad-air opened 1 year ago

hammad-air commented 1 year ago

Recently, I am facing issue when I add agent.add(new Suggestion('Yes')).

It is not working when I check it on DialogFlow Messenger (Website chatbot integration one)

hammad-air commented 1 year ago

Resolved by myself :) :

const payload = { richContent: [ [{ type: "chips", options: [{ text: "Yes ✅", }, { text: "No❌", } ], },], ], }; agent.add( new Payload(agent.UNSPECIFIED, payload, { rawPayload: true, sendAsMessage: true, }) );