Skip to content

Commit

Permalink
high quality discord images
Browse files Browse the repository at this point in the history
  • Loading branch information
GDjkhp committed Apr 26, 2024
1 parent 8556d88 commit 6a30268
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions meeseeks-script.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ async function parseProfile(player, target) {
bar.style = `width: ${((player.detailed_xp[0]/player.detailed_xp[1])*100)}%; background-color: ${color};`;

const avatar = document.getElementsByClassName('avatar')[target];
const url = `https://cdn.discordapp.com/avatars/${player.id}/${player.avatar}`;
const url = `https://cdn.discordapp.com/avatars/${player.id}/${player.avatar}?size=1024`;
const isActive = UrlExists(url);
avatar.src = player.avatar != "" && isActive ? url : "https://gdjkhp.github.io/img/dc.png";

Expand All @@ -113,7 +113,7 @@ async function parseProfile(player, target) {
}

const servericon = document.getElementsByClassName('serverpng')[target];
const url2 = `https://cdn.discordapp.com/icons/${result.guild.id}/${result.guild.icon}`;
const url2 = `https://cdn.discordapp.com/icons/${result.guild.id}/${result.guild.icon}?size=1024`;
servericon.src = UrlExists(url2) ? url2 : "https://gdjkhp.github.io/img/dc.png";

const servername = document.getElementsByClassName('servername')[target];
Expand Down Expand Up @@ -324,7 +324,7 @@ function call_dev_details() {

dev_banner.src = result.banner_url ? result.banner_url : "";
dev_banner.style.height = result.banner_url ? 64 : 0;
url2 = `https://cdn.discordapp.com/icons/${result.guild.id}/${result.guild.icon}`;
url2 = `https://cdn.discordapp.com/icons/${result.guild.id}/${result.guild.icon}?size=1024`;
dev_img.src = UrlExists(url2) ? url2 : "https://gdjkhp.github.io/img/dc.png";
dev_name.innerHTML = result.guild.name;

Expand Down

0 comments on commit 6a30268

Please sign in to comment.