updated settings class and user can now remove pfp

This commit is contained in:
MathMan05 2024-08-22 15:06:45 -05:00
parent 39f7a3701a
commit e11cd2e0c1
10 changed files with 537 additions and 72 deletions

View file

@ -298,14 +298,14 @@ class User {
}
}
getpfpsrc() {
if (this.hypotheticalpfp) {
if (this.hypotheticalpfp && this.avatar) {
return this.avatar;
}
if (this.avatar != null) {
return this.info.cdn + "/avatars/" + this.id.replace("#clone", "") + "/" + this.avatar + ".png";
}
else {
const int = new Number((BigInt(this.id) >> 22n) % 6n);
const int = new Number((BigInt(this.id.replace("#clone", "")) >> 22n) % 6n);
return this.info.cdn + `/embed/avatars/${int}.png`;
}
}