Get responses from quickReplies
See original GitHub issueHi,
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:
- Created 5 years ago
- Comments:6
Top GitHub Comments
@wfrancescons Thanks you, your answer resolved my problem. Thanks u ! 👍
Use
.on(quick_reply:YOUR_PAYLOAD)
. Example:Then: