Created
May 10, 2016 15:30
-
-
Save timblair/af3886125ae87fe64ab238ef222ebfd6 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
module.exports = function (robot) { | |
robot.hear(/ (?:is )(\w+ ?){1,6}/i, function (msg) { | |
if (Math.random() < 0.001) { | |
var match = msg.match[0].trim().replace(/^is /,""); | |
msg.send("You're " + match); | |
} | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment