From 0168941119eb08e7293ac708182ad1a07f845703 Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Tue, 25 Jul 2017 21:49:42 +0000 Subject: [PATCH] Better API for Quote --- commands/random-res/quote.js | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/commands/random-res/quote.js b/commands/random-res/quote.js index 90cf53e3..ff0f1ffb 100644 --- a/commands/random-res/quote.js +++ b/commands/random-res/quote.js @@ -15,17 +15,11 @@ module.exports = class QuoteCommand extends Command { async run(msg) { const { body } = await snekfetch - .get('https://api.forismatic.com/api/1.0/') - .query({ - method: 'getQuote', - lang: 'en', - format: 'json' - }); + .get('https://talaikis.com/api/quotes/random/'); const embed = new MessageEmbed() .setColor(0x9797FF) - .setURL(body.quoteLink) - .setAuthor(body.quoteAuthor) - .setDescription(body.quoteText); + .setAuthor(body.author) + .setDescription(body.quote); return msg.embed(embed); } };