Last active
April 22, 2016 20:04
-
-
Save devStepsize/1f43a5bd467b951cfd8960852297d053 to your computer and use it in GitHub Desktop.
Botkit conversation with ask and a single callback
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// From https://github.com/howdyai/botkit#using-conversationask-with-a-callback | |
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(); | |
}); | |
}) | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment