foxwells.vinboard: fix standalone image links
This commit is contained in:
parent
e4576bfc74
commit
f284c8b9d5
1 changed files with 3 additions and 1 deletions
|
@ -190,7 +190,9 @@ async function findSuitableImage(msg) {
|
||||||
} else {
|
} else {
|
||||||
for (const embed of msg.embeds) {
|
for (const embed of msg.embeds) {
|
||||||
if (!embed.url) continue;
|
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;
|
out.url = embed.image.url;
|
||||||
break;
|
break;
|
||||||
} else if (embed.video) {
|
} else if (embed.video) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue