hubot-scripts
Version:
Allows you to opt in to a variety of scripts
20 lines (18 loc) • 438 B
text/coffeescript
# Description:
# Allows Hubot to help you decide between multiple options
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
# hubot decide "<option1>" "<option2>" "<optionx>" - Randomly picks an option
#
# Authors:
# logikal
module.exports = (robot) ->
robot.respond /decide "(.*)"/i, (msg) ->
options = msg.match[1].split('" "')
msg.reply("Definitely \"#{ msg.random options }\".")