diff --git a/src/util/misc.js b/src/util/misc.js index 712ad15..3226bc4 100644 --- a/src/util/misc.js +++ b/src/util/misc.js @@ -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);