Permalink
Browse files

simple script to cool things off

  • Loading branch information...
1 parent 9870aee commit 28ea6750d4603b6d091b1934f0c44d004b661cb3 @camacho camacho committed Dec 19, 2012
Showing with 25 additions and 0 deletions.
  1. +25 −0 src/scripts/calm-down.coffee
@@ -0,0 +1,25 @@
+# Description:
+# Calm down
+#
+# Commands:
+# hubot calm me | manatee me - Reply with Manatee
+# calm down | simmer down | that escalated quickly - Reply with Manatee
+# ALL CAPS | LONGCAPS - Reply with Manatee
+
+module.exports = (robot) ->
+ manatee = ->
+ num = Math.floor(Math.random() * 30) + 1
+ "http://calmingmanatee.com/img/manatee#{ num }.jpg"
+
+ robot.respond /manatee|calm( me)?/i, (msg) -> msg.send manatee()
+
+ robot.hear ///
+ (calm down)|
+ (simmer down)|
+ (that escalated quickly)
+ ///i, (msg) -> msg.send manatee()
+
+ robot.hear ///
+ (([A-Z]{2,}\s+)([A-Z]{2,})\s?)|
+ ([A-Z]{5,})
+ ///, (msg) -> msg.send manatee()

0 comments on commit 28ea675

Please sign in to comment.