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
Did you know?
JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.
Security insights from Cside
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#