Skip to content

Instantly share code, notes, and snippets.

@65Mustang289
Last active July 29, 2021 13:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 65Mustang289/7d76389dc0d1aa2a6e8ec75261000f42 to your computer and use it in GitHub Desktop.
Save 65Mustang289/7d76389dc0d1aa2a6e8ec75261000f42 to your computer and use it in GitHub Desktop.
Add the following (after line 13) in scripts/sample.js
robot.respond(/give @(.+) a number/i, function(msg) {
var recipient = msg.match[1];
var num = Math.floor(Math.random() * 10);
msg.reply("@" + recipient + " you get " + num);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment