fix getDefaultAvatar
This commit is contained in:
parent
dd781eb5b2
commit
c3f15e263a
1 changed files with 3 additions and 3 deletions
|
@ -180,10 +180,10 @@ function formatGuildFeatures(features) {
|
||||||
function getDefaultAvatar(id, discriminator = null, size = 4096) {
|
function getDefaultAvatar(id, discriminator = null, size = 4096) {
|
||||||
let index = 0;
|
let index = 0;
|
||||||
|
|
||||||
if (discriminator && discriminator > 0) {
|
if (discriminator && Number(discriminator) > 0) {
|
||||||
index = discriminator % 5;
|
index = Number(discriminator) % 5;
|
||||||
} else if (id != null) {
|
} else if (id != null) {
|
||||||
index = (Number(id) << 22) % 6;
|
index = (Number(id) >> 22) % 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
return CDNEndpoints.DEFAULT_AVATAR(index, size);
|
return CDNEndpoints.DEFAULT_AVATAR(index, size);
|
||||||
|
|
Loading…
Reference in a new issue