Created
April 19, 2014 01:16
-
-
Save martinisoft/11070596 to your computer and use it in GitHub Desktop.
Squee! Script for Hubot
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: | |
# Need a little cuteness in your life? YES YOU DO! | |
# | |
# Dependencies: | |
# None | |
# | |
# Configuration: | |
# None | |
# | |
# Commands: | |
# hubot squee - Bring a little cuteness in your life | |
module.exports = (robot) -> | |
robot.respond /squee( me)?!?/i, (msg) -> | |
msg.http("http://imgur.com/r/aww.json") | |
.get() (err, res, body) -> | |
content = JSON.parse(body) | |
squee = msg.random content.data | |
msg.send "http://imgur.com/#{squee.hash}#{squee.ext}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
A quick demo: