Skip to content

Commit

Permalink
Fixing annoying lil buggers
Browse files Browse the repository at this point in the history
  • Loading branch information
CrazyLemon committed Dec 23, 2016
1 parent ea142a9 commit e9b6f66
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/chatter.coffee
Expand Up @@ -121,7 +121,7 @@ module.exports = (bot) ->
r.reply bot.random vic

bot.regexp /^\.gif (.+)/, ".gif <query> -- Prikaže naključni gif", (match, r) ->
url = "http://api.giphy.com/v1/gifs/search?q=#{encodeURI(match[1].replace(/[^a-z0-9\s]/g,"").replace(/\s\s+/g, "+"))}&api_key=dc6zaTOxFJmzC"
url = "http://api.giphy.com/v1/gifs/search?q=#{encodeURI(match[1].replace(/[^a-zA-Z0-9\s]/g,"").replace(/\s\s+/g, "+"))}&api_key=dc6zaTOxFJmzC"
bot.fetchJSON url.replace(/%20/g,'+'), (result) ->
if result.pagination.total_count > 0
r.reply result.data[0].images.fixed_height.url
Expand Down

0 comments on commit e9b6f66

Please sign in to comment.