Calm Down, Hubot
A simple script to help calm things down with Hubot
# 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()
Written by Patrick Camacho
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Coffeescript
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#