fix getDefaultAvatar

This commit is contained in:
Cynthia Foxwell 2024-08-15 16:13:55 -06:00
parent dd781eb5b2
commit c3f15e263a

View file

@ -180,10 +180,10 @@ function formatGuildFeatures(features) {
function getDefaultAvatar(id, discriminator = null, size = 4096) {
let index = 0;
if (discriminator && discriminator > 0) {
index = discriminator % 5;
if (discriminator && Number(discriminator) > 0) {
index = Number(discriminator) % 5;
} else if (id != null) {
index = (Number(id) << 22) % 6;
index = (Number(id) >> 22) % 6;
}
return CDNEndpoints.DEFAULT_AVATAR(index, size);