-
-
Save thesifter/42b6a336aa1dcb06e126 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Description: | |
# Decides between two given options | |
# | |
# Dependencies: | |
# None | |
# | |
# Configuration: | |
# None | |
# | |
# Commands: | |
# hubot decide <answer one> or <answer two> | |
# | |
# Author: | |
# James Macfie | |
module.exports = (robot) -> | |
robot.respond /decide (.+?) or (.+?)$/i, (msg) -> | |
answer = Math.round(Math.random()) + 1 | |
msg.send 'I choose ' + msg.match[answer] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment