foxwells.vinboard: fix standalone image links

This commit is contained in:
Cynthia Foxwell 2022-12-03 12:46:04 -07:00
parent e4576bfc74
commit f284c8b9d5
1 changed files with 3 additions and 1 deletions

View File

@ -190,7 +190,9 @@ async function findSuitableImage(msg) {
} else {
for (const embed of msg.embeds) {
if (!embed.url) continue;
if (embed.image) {
if (embed.url && /(jpe?g|png|gif|webp)$/.test(url)) {
out.url = embed.url;
} else if (embed.image) {
out.url = embed.image.url;
break;
} else if (embed.video) {