Skip to content

Commit

Permalink
feat(presence): re-introduce image resolving for other platforms (#9637)
Browse files Browse the repository at this point in the history
* spotify, youtube, twitch
* regression born from misunderstanding in 9a6e691

Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
almostSouji and kodiakhq[bot] committed Jun 14, 2023
1 parent a873ec1 commit 73c2f8a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/discord.js/src/structures/Presence.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 73c2f8a

Please sign in to comment.