Created
August 2, 2016 15:36
-
-
Save mbrevoort/7a0d8612816a087f11c99398c308eee6 to your computer and use it in GitHub Desktop.
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
// convo handlers are registered with unique strings | |
const handleGoodDay = 'handleGoodDay' | |
// handle any DM that starts with 'hi' | |
slapp.message('^hi', 'direct_message', (msg) => { | |
// Ask how they are and route next message to handleGoodDay handler | |
msg.say('Are you having a good day?').route(handleGoodDay) | |
}) | |
// register handleGoodDay handler | |
slapp.route(handleGoodDay, (msg) => { | |
msg.say(':expressionless:') | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment