patch around Abstract for DDG

This commit is contained in:
John Facey
2021-12-23 23:11:58 -06:00
parent 22bc43e894
commit f8ff15a018
2 changed files with 2 additions and 2 deletions

View File

@@ -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*

View File

@@ -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)}`