Check for the article embed type

This commit is contained in:
Essem 2022-01-15 10:47:41 -06:00
parent 535e6e0e4a
commit 2db49e65e0
No known key found for this signature in database
GPG Key ID: 7D497397CC3A2A8C
2 changed files with 1 additions and 2 deletions

View File

@ -43,7 +43,6 @@ if (!isMainThread) {
.then(returnObject => {
parentPort.postMessage(returnObject);
process.exit();
return;
})
.catch(err => {
// turn promise rejection into normal error

View File

@ -109,7 +109,7 @@ const checkImages = async (message, extraReturnTypes, video, sticker) => {
} else if ((message.embeds[0].type === "video" || message.embeds[0].type === "image") && message.embeds[0].thumbnail) {
type = await getImage(message.embeds[0].thumbnail.proxy_url, message.embeds[0].thumbnail.url, video, extraReturnTypes);
// finally we check both possible image fields for "generic" embeds
} else if (message.embeds[0].type === "rich") {
} else if (message.embeds[0].type === "rich" || message.embeds[0].type === "article") {
if (message.embeds[0].thumbnail) {
type = await getImage(message.embeds[0].thumbnail.proxy_url, message.embeds[0].thumbnail.url, video, extraReturnTypes);
} else if (message.embeds[0].image) {