misc.search: fix error

This commit is contained in:
Cynthia Foxwell 2023-01-17 17:33:21 -07:00
parent bf83368762
commit 3d5aedde8e

View file

@ -565,7 +565,7 @@ search.callback = async function (msg, line) {
}
const res = await fetch(librex + "/api.php?q=${query}&p=0&t=0");
const results = await res.json().splice(0, 5);
const results = await res.json().then((arr) => arr.splice(0, 5));
let out = `__Results for \`${safeString(line)}\`__\n`;
for (const result of results) {