From 8c627beec83e2a55954519ff151b396894fd893e Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Wed, 5 Jul 2017 20:58:04 +0000 Subject: [PATCH] Remove Google Command --- commands/search/google.js | 39 --------------------------------------- html/carbonfeat.html | 1 - html/discordbots.html | 1 - 3 files changed, 41 deletions(-) delete mode 100644 commands/search/google.js diff --git a/commands/search/google.js b/commands/search/google.js deleted file mode 100644 index b991692f..00000000 --- a/commands/search/google.js +++ /dev/null @@ -1,39 +0,0 @@ -const Command = require('../../structures/Command'); -const snekfetch = require('snekfetch'); -const cheerio = require('cheerio'); -const querystring = require('querystring'); - -module.exports = class GoogleCommand extends Command { - constructor(client) { - super(client, { - name: 'google', - group: 'search', - memberName: 'google', - description: 'Searches Google for your query.', - args: [ - { - key: 'query', - prompt: 'What would you like to search for?', - type: 'string' - } - ] - }); - } - - async run(msg, args) { - const { query } = args; - const message = await msg.say('Searching...'); - try { - const { text } = await snekfetch - .get('https://www.google.com/search') - .query({ q: query }); - const $ = cheerio.load(text); - let href = $('.r').first().find('a').first().attr('href'); - if (!href) throw new Error('No Results'); - href = querystring.parse(href.replace('/url?', '')); - return message.edit(href.q); - } catch (err) { - return message.edit(err.message); - } - } -}; diff --git a/html/carbonfeat.html b/html/carbonfeat.html index 09dbcb9a..fb61aebd 100644 --- a/html/carbonfeat.html +++ b/html/carbonfeat.html @@ -44,7 +44,6 @@
  • Yahoo Weather
  • Gelbooru
  • Giphy
  • -
  • Google
  • Konachan
  • Google Maps
  • Neopets
  • diff --git a/html/discordbots.html b/html/discordbots.html index e491806a..6d4d6912 100644 --- a/html/discordbots.html +++ b/html/discordbots.html @@ -41,7 +41,6 @@
  • Yahoo Weather
  • Gelbooru
  • Giphy
  • -
  • Google
  • Konachan
  • Google Maps
  • Neopets