Is there any way i can ask my bot a question and make it wait for a response to that particular question so i could do some more things on that particular message?
Asked
Active
Viewed 1,064 times
0
-
Was the answer what you were looking for? Why don't you set it as the accepted answer or provide feedback. – Antony D'Andrea Aug 01 '16 at 12:05
1 Answers
2
Yes, there are examples in the botkit readme. copy pasting :
controller.hears(['question me'], 'message_received',function(bot,message) {
// start a conversation to handle this response.
bot.startConversation(message,function(err,convo) {
convo.ask('How are you?',function(response,convo) {
convo.say('Cool, you said: ' + response.text);
convo.next();
});
})
})

Matthieu
- 1,149
- 7
- 11