Skip to content

Commit

Permalink
Update discord-lookup.js
Browse files Browse the repository at this point in the history
  • Loading branch information
HirAvanCniK committed Apr 5, 2024
1 parent d56cf86 commit 9210534
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions static/js/discord-lookup.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ function get_default_avatar(){
let member_div, hidden_div, global_username, alias, img;

for(let i in members_discord_ids){
fetch(`https://discordlookup.mesavirep.xyz/v1/user/${members_discord_ids[i]}`).then(response => response.json()).then(async data => {
fetch(`https://discord-lookup-rest-api.deeploy.ing/v1/user/lookup/${members_discord_ids[i]}`).then(response => response.json()).then(async member => {
member_div = document.createElement("div");
hidden_div = document.createElement("div");
hidden_div.className = "hidden-text";
Expand All @@ -59,9 +59,9 @@ for(let i in members_discord_ids){
member_div.style.fontSize = "small";
img.style.width = "80px";
img.style.borderRadius = "20px";
img.src = await data.avatar.link || `./static/imgs/discord-default-pfps/${get_default_avatar()}`;
global_username.textContent = await data.global_name;
alias.textContent = await data.username;
img.src = await member.data.avatar.url || `./static/imgs/discord-default-pfps/${get_default_avatar()}`;
global_username.textContent = await member.data.displayName;
alias.textContent = await member.data.username;
member_div.appendChild(img);
hidden_div.appendChild(global_username);
hidden_div.appendChild(alias);
Expand Down

0 comments on commit 9210534

Please sign in to comment.