From cb447b12f6f9d3f6e5c3d039f2cd5a2c9ea0b806 Mon Sep 17 00:00:00 2001 From: John Facey Date: Tue, 28 Dec 2021 16:15:05 -0600 Subject: [PATCH] fixing DDG default messages --- commands/answer.js | 4 +--- libFlayer.js | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/commands/answer.js b/commands/answer.js index 9dd61ce..13e2c37 100644 --- a/commands/answer.js +++ b/commands/answer.js @@ -12,8 +12,6 @@ module.exports = { var question = encodeURIComponent(args.join(" ")); var answerData = await libFlayer.getAnswer(question); - message.reply(`${answerData.text}`); - - + message.reply(`${answerData.text} - ${answerData.source}`); } }; \ No newline at end of file diff --git a/libFlayer.js b/libFlayer.js index b07c98e..f7ae4e2 100644 --- a/libFlayer.js +++ b/libFlayer.js @@ -212,7 +212,7 @@ exports.getAnswer = async function (question) { var answerURL = `https://api.duckduckgo.com/?q=${question}&format=json&pretty=1`; console.log(answerURL); answerData = { - text: ``, + text: `No answer found try using a simpler search term`, source: `` } await axios.get(answerURL)