Skip to content

Instantly share code, notes, and snippets.

@unbalanced
Created June 11, 2015 16:29
Show Gist options
  • Save unbalanced/c458e86251974452a5a6 to your computer and use it in GitHub Desktop.
Save unbalanced/c458e86251974452a5a6 to your computer and use it in GitHub Desktop.
wishing.coffee
module.exports = (robot) ->
robot.hear /(?=home|i\'m|feel|little|bit).*sick/i, (msg) ->
wishings = ["get well soon!!", "feel better!", "we will miss you today", "please don't die",
"drink a lot of fluids", "have some tea, stay in bed", "wear a sweater next time"]
wish = msg.random wishings
msg.send "hey @#{msg.message.user.name}, #{wish}"
robot.hear /(?=work(ing)?|stay(ing)?).*home/i, (msg) ->
wishings = ["We will miss you!", "You didn't mention if you're sick, if you are, feel better!", "thanks for letting everybody know"]
wish = msg.random wishings
msg.send "hey @#{msg.message.user.name}, #{wish}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment