Fix Member: avatarURL() allowed for bots

This commit is contained in:
Nicolás Serna 2022-07-02 17:04:03 -03:00
parent e60deb6cd9
commit aa3c2724d3

View File

@ -100,6 +100,10 @@ export class Member implements Model {
avatarURL(options: { format?: ImageFormat; size?: ImageSize } = { size: 128 }) {
let url: string;
if (this.user.bot) {
return this.user.avatarURL()
}
if (!this.avatarHash) {
url = Routes.USER_DEFAULT_AVATAR(Number(this.user.discriminator) % 5);
} else {