From 05e5fada2770a2a971447b31467cbf181cb3c4ce Mon Sep 17 00:00:00 2001 From: almostSouji Date: Sun, 11 Jun 2023 08:00:19 +0200 Subject: [PATCH] feat(presence): re-introduce image resolving for other platforms * spotify, youtube, twitch * regression born from misunderstanding in 9a6e691 --- packages/discord.js/src/structures/Presence.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/discord.js/src/structures/Presence.js b/packages/discord.js/src/structures/Presence.js index 1a3cde067218..79ecb2918b3b 100644 --- a/packages/discord.js/src/structures/Presence.js +++ b/packages/discord.js/src/structures/Presence.js @@ -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; }