From 47f9a41854ebb00060649eebd0a4a0a3c1ca401d Mon Sep 17 00:00:00 2001 From: Daniel Odendahl Jr Date: Thu, 23 Mar 2017 21:03:22 +0000 Subject: [PATCH] Fix Quiz --- commands/random/quiz.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/random/quiz.js b/commands/random/quiz.js index a3752a4b..0b50fea5 100644 --- a/commands/random/quiz.js +++ b/commands/random/quiz.js @@ -29,16 +29,16 @@ module.exports = class QuizCommand extends commando.Command { .then(function(response) { const embed = new Discord.RichEmbed() .setTitle('You have **fifteen** seconds to answer this question:') - .setDescription(`**Category: ${response.body.category}**\n${response.body.question}`); + .setDescription(`**Category: ${response.body[0].category}**\n${response.body[0].question}`); message.channel.sendEmbed(embed).then(() => { - message.channel.awaitMessages(res => res.content.toLowerCase() === response.body.answer.toLowerCase() && res.author.id === message.author.id, { + message.channel.awaitMessages(res => res.content.toLowerCase() === response.body[0].answer.toLowerCase() && res.author.id === message.author.id, { max: 1, time: 15000, errors: ['time'], }).then((collected) => { return message.channel.send(`Good Job! You won!`); }).catch(() => { - return message.channel.send(`Aw... Too bad, try again next time!\nThe Correct Answer was: ${response.body.answer}`); + return message.channel.send(`Aw... Too bad, try again next time!\nThe Correct Answer was: ${response.body[0].answer}`); }); }).catch(function(err) { console.log(err);