From f8ff15a018731320c1a4a8f20e564aaef994d809 Mon Sep 17 00:00:00 2001 From: John Facey Date: Thu, 23 Dec 2021 23:11:58 -0600 Subject: [PATCH] patch around Abstract for DDG --- commands/help.js | 2 +- libFlayer.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/commands/help.js b/commands/help.js index 5a1a595..91d971d 100644 --- a/commands/help.js +++ b/commands/help.js @@ -10,7 +10,7 @@ module.exports = { **!categories** - Displays Categories: *!categories* **!search** - Searches the RSS Sources: *!search google* **!get** - Retrieves Search By Index: *!get 25* - **!add** - Add a new RSS Source Feed dynamically: *!add http://www.engadget.com/rss.xml* + **!add** - Add a new RSS Source: *!add http://www.engadget.com/rss.xml* **!update** - Updates all current RSS Feeds: *!update* **!quote** - Selects a random quote: *!quote* **!random** - Selects a random article: *!random* diff --git a/libFlayer.js b/libFlayer.js index d874518..ea8e798 100644 --- a/libFlayer.js +++ b/libFlayer.js @@ -95,7 +95,7 @@ exports.getAnswer = async function (question) { console.log(response.data.RelatedTopics[0].Text); console.log(response.data.RelatedTopics[0].FirstURL); - if (response.data.Entity == "company") { + if (response.data.Abstract != "") { answerData = { text: `${unescape(response.data.Abstract)}`, source: `${unescape(response.data.AbstractSource)}`