From d88a2449ba7c91e2319320355f4b7068c392dca7 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Wed, 21 Feb 2018 22:27:54 +0000 Subject: [PATCH] Discord auto-embeds --- commands/search/google.js | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/commands/search/google.js b/commands/search/google.js index 18257e72..8893f89e 100644 --- a/commands/search/google.js +++ b/commands/search/google.js @@ -1,6 +1,5 @@ const { Command } = require('discord.js-commando'); const snekfetch = require('snekfetch'); -const { stripIndents } = require('common-tags'); const { GOOGLE_KEY, CUSTOM_SEARCH_ID } = process.env; module.exports = class GoogleCommand extends Command { @@ -33,12 +32,7 @@ module.exports = class GoogleCommand extends Command { }); if (!body.items) return msg.say('Could not find any results.'); const data = body.items[0]; - return msg.say(stripIndents` - **${data.title}** - ${data.snippet.replace(/\n/g, '')} - - ${data.formattedUrl} - `); + return msg.say(data.formattedUrl); } catch (err) { return msg.say(`http://lmgtfy.com/?iie=1&q=${encodeURIComponent(query)}`); }