mirror of
https://github.com/kirameki-cafe/Yumi.git
synced 2026-09-13 18:59:19 +00:00
Low res thumbnail fix
This commit is contained in:
@@ -61,7 +61,11 @@ const EMBEDS = {
|
||||
user: DiscordProvider.client.user
|
||||
});
|
||||
|
||||
embed.setImage(track.thumbnails[0].url);
|
||||
const highestResolutionThumbnail = track.thumbnails.reduce((prev, current) => (prev.height * prev.width > current.height * current.width) ? prev : current)
|
||||
|
||||
if(highestResolutionThumbnail)
|
||||
embed.setImage(highestResolutionThumbnail.url);
|
||||
|
||||
return embed;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user