hubot-scripts
Version:
Allows you to opt in to a variety of scripts
27 lines (22 loc) • 705 B
text/coffeescript
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()
unless process.env.HUBOT_LESS_MANATEES
robot.hear ///
(\b([A-Z]{2,}\s+)([A-Z]{2,})\b)|
(\b[A-Z]{5,}\b)
///, (msg) -> msg.send manatee()