mirror of
https://github.com/kirameki-cafe/Yumi.git
synced 2026-09-13 10:49:20 +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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,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;
|
||||
},
|
||||
NO_MUSIC_PLAYING: (data: Message | Interaction) => {
|
||||
|
||||
@@ -38,7 +38,12 @@ const EMBEDS = {
|
||||
description: `${track.title}`,
|
||||
user: (data instanceof Interaction) ? data.user : data.author
|
||||
});
|
||||
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;
|
||||
},
|
||||
ADDED_SONGS_QUEUE: (data: Message | Interaction, track: ValidTracks[]) => {
|
||||
|
||||
@@ -38,7 +38,12 @@ const EMBEDS = {
|
||||
description: `${track.title}`,
|
||||
user: (data instanceof Interaction) ? data.user : data.author
|
||||
});
|
||||
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;
|
||||
},
|
||||
USER_NOT_IN_VOICECHANNEL: (data: Message | Interaction) => {
|
||||
|
||||
Reference in New Issue
Block a user