diff options
author | syeyoung <cyoung06@naver.com> | 2023-01-25 17:53:47 +0900 |
---|---|---|
committer | syeyoung <cyoung06@naver.com> | 2023-01-25 17:53:47 +0900 |
commit | 471faf2df582d9a0d00c0b3e0addf93c6cfb903e (patch) | |
tree | 1ee8b9e1eddf45f858fad49e67b2a9cb9725ad1c /mod/src/main | |
parent | 53bf2b46bfad11720790b65220d52d94a49273d7 (diff) | |
download | Skyblock-Dungeons-Guide-471faf2df582d9a0d00c0b3e0addf93c6cfb903e.tar.gz Skyblock-Dungeons-Guide-471faf2df582d9a0d00c0b3e0addf93c6cfb903e.tar.bz2 Skyblock-Dungeons-Guide-471faf2df582d9a0d00c0b3e0addf93c6cfb903e.zip |
- Fix pfp not loading properly
Signed-off-by: syeyoung <cyoung06@naver.com>
Diffstat (limited to 'mod/src/main')
-rw-r--r-- | mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/User.java | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/User.java b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/User.java index 986e9ed9..b31f189c 100644 --- a/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/User.java +++ b/mod/src/main/java/kr/syeyoung/dungeonsguide/mod/discord/User.java @@ -97,7 +97,7 @@ public class User */ public String getAvatarUrl() { - return getAvatarId() == null ? null : "https://cdn.discord.com/avatars/" + getId() + "/" + getAvatarId() + return getAvatarId() == null ? null : "https://cdn.discordapp.com/avatars/" + getId() + "/" + getAvatarId() + (getAvatarId().startsWith("a_") ? ".gif" : ".png"); } @@ -108,7 +108,7 @@ public class User */ public String getDefaultAvatarId() { - return DefaultAvatar.values()[Integer.parseInt(getDiscriminator()) % DefaultAvatar.values().length].toString(); + return DefaultAvatar.values()[DefaultAvatar.values().length].toString(); } /** @@ -118,7 +118,7 @@ public class User */ public String getDefaultAvatarUrl() { - return "https://discord.com/assets/" + getDefaultAvatarId() + ".png"; + return "https://cdn.discordapp.com/embed/avatars/" + Integer.parseInt(getDiscriminator()) % 5 + ".png"; } /** |