Created
April 22, 2016 21:22
-
-
Save devStepsize/f761db74ddc5d51351707e3a15544484 to your computer and use it in GitHub Desktop.
Botkit replace the built in regex match with a middleware function
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#hear-middleware | |
// This will replace the matching function used in hears() as well as inside convo.ask() | |
controller.changeEars(function(patterns, message) { | |
// ... do something | |
// return true or false | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment