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
|
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;
|
return embed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,11 @@ const EMBEDS = {
|
|||||||
user: DiscordProvider.client.user
|
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;
|
return embed;
|
||||||
},
|
},
|
||||||
NO_MUSIC_PLAYING: (data: Message | Interaction) => {
|
NO_MUSIC_PLAYING: (data: Message | Interaction) => {
|
||||||
|
|||||||
@@ -38,7 +38,12 @@ const EMBEDS = {
|
|||||||
description: `${track.title}`,
|
description: `${track.title}`,
|
||||||
user: (data instanceof Interaction) ? data.user : data.author
|
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;
|
return embed;
|
||||||
},
|
},
|
||||||
ADDED_SONGS_QUEUE: (data: Message | Interaction, track: ValidTracks[]) => {
|
ADDED_SONGS_QUEUE: (data: Message | Interaction, track: ValidTracks[]) => {
|
||||||
|
|||||||
@@ -38,7 +38,12 @@ const EMBEDS = {
|
|||||||
description: `${track.title}`,
|
description: `${track.title}`,
|
||||||
user: (data instanceof Interaction) ? data.user : data.author
|
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;
|
return embed;
|
||||||
},
|
},
|
||||||
USER_NOT_IN_VOICECHANNEL: (data: Message | Interaction) => {
|
USER_NOT_IN_VOICECHANNEL: (data: Message | Interaction) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user