Removed some disabled events, filter out more data URIs
This commit is contained in:
parent
f0e19d6ad3
commit
531d7915bb
2 changed files with 1 additions and 7 deletions
6
app.js
6
app.js
|
@ -62,12 +62,6 @@ const Admiral = new Fleet({
|
||||||
disableEvents: {
|
disableEvents: {
|
||||||
CHANNEL_DELETE: true,
|
CHANNEL_DELETE: true,
|
||||||
GUILD_BAN_REMOVE: 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,
|
TYPING_START: true,
|
||||||
MESSAGE_DELETE_BULK: true,
|
MESSAGE_DELETE_BULK: true,
|
||||||
WEBHOOKS_UPDATE: true,
|
WEBHOOKS_UPDATE: true,
|
||||||
|
|
|
@ -13,7 +13,7 @@ class ImageSearchCommand extends Command {
|
||||||
const embeds = [];
|
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());
|
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!";
|
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()) {
|
for (const [i, value] of images.entries()) {
|
||||||
embeds.push({
|
embeds.push({
|
||||||
"embed": {
|
"embed": {
|
||||||
|
|
Loading…
Reference in a new issue