mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-03 05:26:07 +00:00
fix: avatarURL method (#171)
This commit is contained in:
parent
ad08a85dea
commit
745ad5c6c1
@ -34,7 +34,8 @@ export class User extends DiscordBase<APIUser> {
|
|||||||
|
|
||||||
avatarURL(options?: ImageOptions) {
|
avatarURL(options?: ImageOptions) {
|
||||||
if (!this.avatar) {
|
if (!this.avatar) {
|
||||||
return this.rest.cdn.defaultAvatar(Number(this.discriminator));
|
const avatarIndex = this.discriminator == '0' ? Number(BigInt(this.id) >> 22n) % 6 : this.discriminator % 5;
|
||||||
|
return this.rest.cdn.defaultAvatar(avatarIndex);
|
||||||
}
|
}
|
||||||
return this.rest.cdn.avatar(this.id, this.avatar, options);
|
return this.rest.cdn.avatar(this.id, this.avatar, options);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user