Skip to content

Instantly share code, notes, and snippets.

@captDaylight
Last active May 15, 2016 22:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save captDaylight/fe8afee4a12ac32a39418123f5c5ea3f to your computer and use it in GitHub Desktop.
Save captDaylight/fe8afee4a12ac32a39418123f5c5ea3f to your computer and use it in GitHub Desktop.
return (err, convo) => {
convo.ask('Do you want to play `paper`, `rock`, or `scissors`?', [
{
pattern: 'paper|rock|scissors',
callback(response, convo) {
// since no further messages are queued after this,
// the conversation will end naturally with status === ‘completed’
convo.next();
},
}, {
default: true,
callback(response, convo) {
convo.repeat();
convo.next();
},
},
]);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment