Skip to content

Commit 73c2f8a

Browse files
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>
1 parent a873ec1 commit 73c2f8a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

packages/discord.js/src/structures/Presence.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,12 @@ class RichPresenceAssets {
358358
switch (platform) {
359359
case 'mp':
360360
return `https://media.discordapp.net/${id}`;
361+
case 'spotify':
362+
return `https://i.scdn.co/image/${id}`;
363+
case 'youtube':
364+
return `https://i.ytimg.com/vi/${id}/hqdefault_live.jpg`;
365+
case 'twitch':
366+
return `https://static-cdn.jtvnw.net/previews-ttv/live_user_${id}.png`;
361367
default:
362368
return null;
363369
}

0 commit comments

Comments
 (0)