move to discord proxy for images, add lanyard hb, #6
This commit is contained in:
parent
c79ee2b203
commit
7d78a74a25
2 changed files with 42 additions and 18 deletions
|
@ -78,7 +78,10 @@
|
|||
|
||||
const img = activity.assets?.large_image;
|
||||
let art = null;
|
||||
if (img?.includes("https")) {
|
||||
|
||||
if (img?.startsWith("mp:external/")) {
|
||||
art = `https://media.discordapp.net/external/${img.slice("mp:external/".length)}`;
|
||||
} else if (img?.includes("/https/")) {
|
||||
const clean = img.split("/https/")[1];
|
||||
if (clean) art = `https://${clean}`;
|
||||
} else if (img?.startsWith("spotify:")) {
|
||||
|
@ -87,6 +90,7 @@
|
|||
art = `https://cdn.discordapp.com/app-assets/${activity.application_id}/${img}.png`;
|
||||
}
|
||||
|
||||
|
||||
const activityTypeMap = {
|
||||
0: "Playing",
|
||||
1: "Streaming",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue