3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-15 05:41:51 +00:00

starboard: use embed thumbnails as image if there is no image

This commit is contained in:
Dragory 2020-12-23 02:39:44 +02:00
parent b616b6a02a
commit 867155019e
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1

View file

@ -36,7 +36,11 @@ export async function saveMessageToStarboard(
// Merge media and - if copy_full_embed is enabled - fields and title from the first embed in the original message
if (msg.embeds.length > 0) {
if (msg.embeds[0].image) embed.image = msg.embeds[0].image;
if (msg.embeds[0].image) {
embed.image = msg.embeds[0].image;
} else if (msg.embeds[0].thumbnail) {
embed.image = { url: msg.embeds[0].thumbnail.url };
}
if (starboard.copy_full_embed) {
if (msg.embeds[0].title) {