mirror of
https://github.com/zyqunix/tools.git
synced 2025-07-05 22:10:31 +02:00
23 lines
667 B
JavaScript
23 lines
667 B
JavaScript
lanyard({
|
|
userId: "1201415921802170388",
|
|
}).then(data => {
|
|
const status = document.getElementById('status');
|
|
const nameDiv = document.getElementById('name');
|
|
const customStatus = data.activities.find(activity => activity.type === 4);
|
|
|
|
const statusColors = {
|
|
online: "#23a55a",
|
|
idle: "#f0b232",
|
|
dnd: "#f23f43",
|
|
offline: "#80848e"
|
|
};
|
|
|
|
document.getElementById('pfp').style.borderColor = statusColors[data.discord_status] || offline;
|
|
|
|
if (customStatus) {
|
|
nameDiv.setAttribute("data-tooltip", customStatus.state);
|
|
} else {
|
|
nameDiv.setAttribute("data-tooltip", "No custom status");
|
|
}
|
|
|
|
})
|