Skip to content

Instantly share code, notes, and snippets.

@tkrpata
Created May 12, 2015 17:53
Show Gist options
  • Save tkrpata/addcbf6dd4d7a44b319e to your computer and use it in GitHub Desktop.
Save tkrpata/addcbf6dd4d7a44b319e to your computer and use it in GitHub Desktop.
# Robot Roll Call
#
# robot roll call - does what it says
#
robots = [
"http://i.imgur.com/6PcNC.jpg", # robot roll call
"http://i.imgur.com/9UmSw.jpg", # cambot
"http://i.imgur.com/1CrLw.jpg", # gypsy
"http://i.imgur.com/SNpTp.jpg", # tom servo
"http://i.imgur.com/HVXpw.jpg", # croooow!
]
module.exports = (robot) ->
robot.hear /robot roll call/i, (msg) ->
sendRobot(0,0,msg);
sendRobot = (index,timeout,msg) ->
msg.send robots[index];
index++;
if index < robots.length
setTimeout (-> sendRobot index, timeout, msg), 750;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment