Permalink
Browse files

remove ddg

  • Loading branch information...
1 parent 2b6ed8b commit 76c776a11362e66d57301e4c0afc430b090cc566 @dz0ny dz0ny committed Dec 31, 2015
Showing with 0 additions and 15 deletions.
  1. +0 −15 scripts/chatter.coffee
View
@@ -1,4 +1,3 @@
-ddg = require('ddg')
colors = require('irc-colors')
module.exports = (bot) ->
@@ -131,20 +130,6 @@ module.exports = (bot) ->
]
r.reply bot.random vic
- bot.regexp /^\.d (.+)/,
- ".d -- Vse kar zna https://api.duckduckgo.com/api ali https://api.duckduckgo.com/goodies",
- (match, r) ->
- options =
- useragent: "ubuntu.si"
- no_redirects: "1"
- no_html: "1"
-
- ddg.query match[1].trim(), options, (err, data) ->
- r.reply data.AbstractText
- r.reply data.Definition
- r.reply data.Answer
- r.reply data.AbstractURL || data.Redirect
-
bot.regexp /^\.gif (.+)/, ".gif <query> -- Prikaže naključni gif", (match, r) ->
url = "http://giphy.com/search/#{encodeURI(match[1].replace(/[^a-z0-9\s]/g,"").replace(/\s\s+/g, "-"))}"
bot.fetchHTML url.replace(/%20/g, '-'), ($) ->

0 comments on commit 76c776a

Please sign in to comment.