Last active
August 29, 2015 14:05
-
-
Save awaxa/69ac5804f42ab2810d84 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: | |
# A port of http://motivate.im/ | |
# | |
# Dependencies: | |
# None | |
# | |
# Configuration: | |
# None | |
# | |
# Commands: | |
# !m <username> - Hubot encourages your user | |
# | |
# Author: | |
# jjasghar | |
module.exports = (robot) -> | |
robot.hear /^!m (.+)$/i, (msg) -> | |
user = msg.match[1] | |
phrase = [ | |
"You're doing good work", | |
"You're awesome", | |
"Keep on rocking" | |
] | |
msg.send phrase[Math.floor(Math.random() * phrase.length)] + ", #{user}!" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment