make pfp fetched from lanyard
Some checks failed
Deploy static content to Pages / deploy (push) Failing after 4s

This commit is contained in:
zyqunix 2025-06-26 15:12:39 +02:00
parent 3e0eb52eaf
commit b18bd5c94e
No known key found for this signature in database
GPG key ID: 134A8DEEA83B80E6
2 changed files with 5 additions and 4 deletions

View file

@ -45,9 +45,10 @@ setInterval(() => {
ageElem.setAttribute("data-tooltip", updateAge(null, 10, "years old"));
}, 10);
const user = "1201415921802170388";
function lan() {
lanyard({userId: "1201415921802170388"}).then(data => {
lanyard({userId: user}).then(data => {
const statusElem = document.getElementById('status');
const pfpElem = document.getElementById('profile-picture');
const activity = document.querySelector('.activity');
@ -63,6 +64,8 @@ function lan() {
offline: "#80848e"
};
pfpElem.src = `https://cdn.discordapp.com/avatars/${user}/${data.discord_user.avatar}.webp`
const borderColor = statusColors[data.discord_status] || statusColors.offline;
pfpElem.style.borderColor = borderColor;
@ -107,8 +110,6 @@ function lan() {
}
} else
activity.style.display = "none";
});
}