mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-10 16:43:31 +01:00
feat(presence): re-introduce image resolving for other platforms (#9637)
* spotify, youtube, twitch
* regression born from misunderstanding in 9a6e691
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -358,6 +358,12 @@ class RichPresenceAssets {
|
||||
switch (platform) {
|
||||
case 'mp':
|
||||
return `https://media.discordapp.net/${id}`;
|
||||
case 'spotify':
|
||||
return `https://i.scdn.co/image/${id}`;
|
||||
case 'youtube':
|
||||
return `https://i.ytimg.com/vi/${id}/hqdefault_live.jpg`;
|
||||
case 'twitch':
|
||||
return `https://static-cdn.jtvnw.net/previews-ttv/live_user_${id}.png`;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user