fixing DDG default messages

This commit is contained in:
John Facey
2021-12-28 16:15:05 -06:00
parent 1bdb8dc2b3
commit cb447b12f6
2 changed files with 2 additions and 4 deletions

View File

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

View File

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