Check for the article embed type
This commit is contained in:
parent
535e6e0e4a
commit
2db49e65e0
2 changed files with 1 additions and 2 deletions
|
@ -43,7 +43,6 @@ if (!isMainThread) {
|
||||||
.then(returnObject => {
|
.then(returnObject => {
|
||||||
parentPort.postMessage(returnObject);
|
parentPort.postMessage(returnObject);
|
||||||
process.exit();
|
process.exit();
|
||||||
return;
|
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
// turn promise rejection into normal error
|
// turn promise rejection into normal error
|
||||||
|
|
|
@ -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) {
|
} 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);
|
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
|
// 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) {
|
if (message.embeds[0].thumbnail) {
|
||||||
type = await getImage(message.embeds[0].thumbnail.proxy_url, message.embeds[0].thumbnail.url, video, extraReturnTypes);
|
type = await getImage(message.embeds[0].thumbnail.proxy_url, message.embeds[0].thumbnail.url, video, extraReturnTypes);
|
||||||
} else if (message.embeds[0].image) {
|
} else if (message.embeds[0].image) {
|
||||||
|
|
Loading…
Reference in a new issue