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

6
app.js
View file

@ -62,12 +62,6 @@ const Admiral = new Fleet({
disableEvents: {
CHANNEL_DELETE: true,
GUILD_BAN_REMOVE: true,
GUILD_MEMBER_ADD: true,
GUILD_MEMBER_REMOVE: true,
GUILD_MEMBER_UPDATE: true,
GUILD_ROLE_CREATE: true,
GUILD_ROLE_DELETE: true,
GUILD_ROLE_UPDATE: true,
TYPING_START: true,
MESSAGE_DELETE_BULK: true,
WEBHOOKS_UPDATE: true,

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": {