Skip to content

Instantly share code, notes, and snippets.

@timblair
Created May 10, 2016 15:30
Show Gist options
  • Save timblair/af3886125ae87fe64ab238ef222ebfd6 to your computer and use it in GitHub Desktop.
Save timblair/af3886125ae87fe64ab238ef222ebfd6 to your computer and use it in GitHub Desktop.
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