Skip to content
This repository
Tom Bell June 09, 2012
file 24 lines (20 sloc) 0.532 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
# Description:
# Allow Hubot to show the image from a quickmeme link, as dragging
# from their site is a pain.
#
# Dependencies:
# None
#
# Configuration:
# None
#
# Commands:
# http://www.quickmeme.com/meme/* - Detects the url and displays the image
#
# Author:
# chrisdrackett

module.exports = (robot) ->
  robot.hear /https?:\/\/www\.quickmeme\.com\/\w+\/(\w+)\//i, (msg) ->
    return if msg.match[2] # Ignore already embedded images.
    
    id = msg.match[1]
    
    msg.send "http://i.qkme.me/" + id + ".jpg"
Something went wrong with that request. Please try again.