From 5c12cca5e80d5b151da50d1ee994e55a9b0e845f Mon Sep 17 00:00:00 2001 From: Dragon Fire Date: Sat, 17 Apr 2021 10:08:18 -0400 Subject: [PATCH] Fix --- commands/games-sp/20-questions.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/commands/games-sp/20-questions.js b/commands/games-sp/20-questions.js index c7feaf6a..983e5830 100644 --- a/commands/games-sp/20-questions.js +++ b/commands/games-sp/20-questions.js @@ -93,14 +93,14 @@ module.exports = class TwentyQuestionsCommand extends Command { cctkr: 'US,AR,VI,GB,AF,PL' }); const $ = cheerio.load(text); - const text = $('big').eq(2).children().first(); + const resultText = $('big').eq(2).children().first(); const answers = []; - $(text).find('a').each((i, elem) => { + $(resultText).find('a').each((i, elem) => { const href = `${baseURI}${$(elem).attr('href')}`; answers.push({ href, text: $(elem).text().trim() }) }); return { - question: text.text().split('\n')[0], + question: resultText.text().split('\n')[0], answers, url: `${baseURI}${startURL}` } @@ -124,14 +124,14 @@ module.exports = class TwentyQuestionsCommand extends Command { result: 'I was unable to guess what you were thinking. Nice job!' }; } - const text = $('big').first().children().first(); + const resultText = $('big').first().children().first(); const answers = []; - $(text).find('a').each((i, elem) => { + $(resultText).find('a').each((i, elem) => { const href = `${baseURI}${$(elem).attr('href')}`; answers.push({ href, text: $(elem).text().trim() }) }); return { - question: text.text().split('\n')[0], + question: resultText.text().split('\n')[0], answers, url: `${baseURI}${startURL}` }