diff --git a/src/modules/misc.js b/src/modules/misc.js index 9229360..c4a536b 100644 --- a/src/modules/misc.js +++ b/src/modules/misc.js @@ -641,7 +641,6 @@ search.callback = async function (msg, line, args, {results = 2}) { const res = await fetch(`${librex}/api.php?q=${encodedQuery}&p=0&t=0`).then( (res) => res.json() ); - delete res.results_source; if (res.error?.message) { if (res.error.message.indexOf("No results found.") > -1) { return "Search returned no results."; @@ -650,7 +649,9 @@ search.callback = async function (msg, line, args, {results = 2}) { } } else { const searchResults = Object.values(res) - .filter((result) => !("did_you_mean" in result)) + .filter( + (result) => result.did_you_mean == null && typeof result !== "string" + ) .splice(0, Number(results)); if (searchResults.length > 0) {