Fix fallback images, Phas fallback image
This commit is contained in:
parent
8c2c22ef27
commit
e40e4573e7
3 changed files with 8 additions and 14 deletions
|
@ -170,19 +170,16 @@ function get_img_url(activity, size = "large_image") {
|
|||
return decodeURIComponent('https://' + image.substr(image.indexOf('https/') + 6, image.length))
|
||||
} else if (image.includes("spotify")) {
|
||||
return decodeURIComponent('https://i.scdn.co/image/' + image.substr(image.indexOf('spotify:') + 8, image.length))
|
||||
} else {
|
||||
return decodeURIComponent(`https://cdn.discordapp.com/app-assets/${activity.application_id}/${image}.png`)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!image) {
|
||||
if (!image && size == "large_image") {
|
||||
if (activity.name in activityImages) {
|
||||
return decodeURIComponent(activityImages[activity.name])
|
||||
} else {
|
||||
return null
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue