Skip to content

Instantly share code, notes, and snippets.

@aflansburg
Created March 15, 2018 05:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aflansburg/f039e170b345be2ce8526e4efccbaa19 to your computer and use it in GitHub Desktop.
Save aflansburg/f039e170b345be2ce8526e4efccbaa19 to your computer and use it in GitHub Desktop.
Hubot script to parrot what you desire in the specified room
# Description:
# RCBOT Parrots what you said to the specified room
#
# Dependencies:
# None
#
# Commands:
# rcbot say in #devops "Something blah blah blah"
#
# Author:
# abram flansburg
module.exports = (robot) ->
robot.respond /say in (?:#(.*))? "(.*?)"/i, (msg) ->
target_room = msg.match[1]
room_msg = msg.match[2]
robot.messageRoom '#' + target_room, room_msg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment