utility.presence: fix spotify images

This commit is contained in:
Cynthia Foxwell 2022-10-10 13:37:44 -06:00
parent fec39bd822
commit a06894bc86

View file

@ -798,6 +798,11 @@ presence.callback = async function (msg, line) {
"mp:",
"https://media.discordapp.net/"
);
} else if (activity.assets.large_image.startsWith("spotify:")) {
largeUrl = activity.assets.large_image.replace(
"spotify:",
"https://i.scdn.co/image/"
);
} else {
largeUrl = `https://cdn.discordapp.com/app-assets/${activity.application_id}/${activity.assets.large_image}.png`;
}