Created
April 22, 2016 21:14
-
-
Save devStepsize/e7ac38e7efb7780d0782a5f4dfc65556 to your computer and use it in GitHub Desktop.
Botkit send middleware to do things like preprocess the message content before it gets sent
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#send-middleware | |
controller.middleware.send.use(function(bot, message, next) { | |
// do something useful... | |
if (message.intent == 'hi') { | |
message.text = 'Hello!!!'; | |
} | |
next(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment