question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Get responses from quickReplies

See original GitHub issue

Hi,

I’m new user from Bootbot framework. I try to get answer from a quick_replies from answer. I didn’t know how to get this. I start with bot.setGetStartedButton() and want to get answer from quickReplies like '‘🏹 Je recherche quelqu'un’ and go to the const convo_find_sexe(). I search in documentation but doesn’t find answer. Can you help me.

Thanks

` ‘use strict’; const BootBot = require(‘bootbot’);

const bot = new BootBot({ accessToken: ‘…’, verifyToken: ‘…’, appSecret: ‘…’ });

const new_tickets = (payload, chat) => { const message = Nouveaux Tickets!; const options = { typing: true }; chat.say(message, options); };

const convo_find_sexe = (convo) => { chat.say({ text: ‘Pour commencer, était-ce une femme ou un homme’, quickReplies: [‘👩 Femme’, ‘👨 Homme’] }); convo.set(‘find_sexe’, payload.message.text); const answer = (payload, convo) => { if (!payload.message) { convo.end(); } const options = { typing: true }; }; };

const favoris = (payload, chat) => { const message = Vos favoris!; const otions = { typing: true }; chat.say(message, options); };

const tickets = (payload, chat) => { const message = Vos tickets!; const options = { typing: true }; chat.say(message, options); };

const faq = (payload, chat) => { const message = Vos questions!; const options = { typing: true }; chat.say(message, options); };

const settings = (payload, chat) => { const message = Vos paramètres!; const options = { typing: true }; chat.say(message, options); };

bot.setGetStartedButton((payload, chat) => { chat.getUserProfile().then((user) => { chat.say(👋 Salut ${user.first_name} ! Sais tu que les plus belles rencontres sont celles auxquelles on ne s\'attend pas? 💘, { typing: true }) .then(() => chat.say(Ces rencontres se font partout, mais surtout ailleurs ! 💕 Je suis là pour faciliter ces rencontres, { typing: true })) .then(() => chat.say({ text: ‘Souhaites tu rechercher quelqu'un ou lire les tickets ?’, quickReplies: [‘🔖 Lire les tickets’, ‘🏹 Je recherche quelqu'un’, ‘⭐ Mes favoris’, ‘💌 Mes tickets’, ‘🤔 Comment ça fonctionne ?’, ‘⚙️ Paramètres’]}) ) }); });

`

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:6

github_iconTop GitHub Comments

1reaction
valdu02100commented, Oct 14, 2018

@wfrancescons Thanks you, your answer resolved my problem. Thanks u ! 👍

1reaction
wfrancesconscommented, Oct 7, 2018

Use .on(quick_reply:YOUR_PAYLOAD). Example:

chat.say({
		text: 'Some text',
		quickReplies: [{
			content_type: "text",
			title: "Option One",
			payload: "OPTION_ONE"
		}, {
				content_type: "text",
				title: "Option Two",
				payload: "OPTION_TWO"
			}], typing: 1000
	}

Then:

bot.on('quick_reply:OPTION_ONE', (payload, chat) => {
	//Do something
});
bot.on('quick_reply:OPTION_TWO', (payload, chat) => {
	//Do something
});
Read more comments on GitHub >

github_iconTop Results From Across the Web

26 Example 'Thank You for Your Quick Response' Emails and ...
26 Emails and phrases you can use to say 'thank you for your quick response'.
Read more >
Use suggested replies in Outlook - Microsoft Support
When you receive an email message that may be answered with a short reply, Outlook mobile web suggests three responses that you can...
Read more >
What are Quick Replies, and how do I use them?
Quick Replies are templated messages that Agents can easily search for and use to reply to end users. These messages include greetings, frequently...
Read more >
What are quick responses and how to create them?
1 - Go to Settings > My Profile and in the "Quick Replies" section click "Manage": A window will open where you can...
Read more >
Quick Replies - Messenger Platform - Meta for Developers
Quick replies provide a way to present a set of up to 13 buttons in-conversation that contain a title and optional image, and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found