aggiunti dank maymays e http cat

This commit is contained in:
Enrico Fasoli 2015-08-28 17:58:22 +00:00
parent 8ddce46efc
commit 971c676efe
2 changed files with 34 additions and 0 deletions

16
scripts/memes.coffee Normal file
View File

@ -0,0 +1,16 @@
# Description:
# makes dank maymays
#
# Commands:
# hubot meme template/upper-title/lower-title
#
# Configuration:
# None
#
# Author:
# Enrico Fasoli (fazo96)
module.exports = (robot) ->
robot.respond /meme (.+)/i, (res) ->
url = 'http://memegen.link/'+res.match[1]+'.jpg'
res.send url

View File

@ -0,0 +1,18 @@
# Description:
# posta codici di stato
#
# Commands:
# hubot (statuscode)
#
# Configuration:
# None
#
# Author:
# Enrico Fasoli (fazo96)
module.exports = (robot) ->
robot.respond /([0-9]{3})$/i, (res) ->
n = parseInt res.match[1]
if n < 100 or n > 599
res.match[1] = "404"
res.send 'http://http.cat/'+res.match[1]+'.jpg'