Removed some disabled events, filter out more data URIs

This commit is contained in:
Essem 2021-08-27 21:38:33 -05:00
parent f0e19d6ad3
commit 531d7915bb
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C
2 changed files with 1 additions and 7 deletions

View file

@ -13,7 +13,7 @@ class ImageSearchCommand extends Command {
const embeds = [];
const rawImages = await fetch(`${random(searx)}/search?format=json&safesearch=2&categories=images&q=!goi%20!bii%20!ddi%20${encodeURIComponent(this.args.join(" "))}`).then(res => res.json());
if (rawImages.results.length === 0) return "I couldn't find any results!";
const images = rawImages.results.filter((val) => !val.img_src.startsWith("data:image"));
const images = rawImages.results.filter((val) => !val.img_src.startsWith("data:"));
for (const [i, value] of images.entries()) {
embeds.push({
"embed": {