diff --git a/commands/random/quotes.js b/commands/random/quotes.js index aa70cef3..18a01ee9 100644 --- a/commands/random/quotes.js +++ b/commands/random/quotes.js @@ -30,9 +30,9 @@ module.exports = class QuotesCommand extends commando.Command { cat: randomTypes }) .then(function(response) { - console.log(response); - console.log(response.body); - return message.channel.send(`"${response.body.quote}"\n - *${response.body.author}*`).catch(error => message.channel.send(':x: Error! Something went wrong!')); + let quoteResponse = JSON.parse(response.text); + console.log(quoteResponse); + return message.channel.send(`"${quoteResponse.quote}"\n - *${quoteResponse.author}*`).catch(error => message.channel.send(':x: Error! Something went wrong!')); }).catch(function(err) { console.log(err); return message.channel.send(":x: Error! Unknown Error. Try again later!");