Last active
May 15, 2016 22:41
-
-
Save captDaylight/fe8afee4a12ac32a39418123f5c5ea3f to your computer and use it in GitHub Desktop.
This file contains 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
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