@@ -202,7 +202,7 @@ class GuildScheduledEvent extends Base {
|
||||
* @returns {?string}
|
||||
*/
|
||||
coverImageURL({ format, size } = {}) {
|
||||
return this.image && this.client.rest.cdn.guildScheduledEventCover(this.id, this.image, format, size);
|
||||
return this.image && this.client.rest.cdn.GuildScheduledEventCover(this.id, this.image, format, size);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -136,17 +136,6 @@ class User extends Base {
|
||||
this.flags = new UserFlags(data.public_flags);
|
||||
}
|
||||
|
||||
if ('avatar_decoration' in data) {
|
||||
/**
|
||||
* The user avatar decoration's hash
|
||||
* @type {?string}
|
||||
* @deprecated Use `avatarDecorationData` instead
|
||||
*/
|
||||
this.avatarDecoration = data.avatar_decoration;
|
||||
} else {
|
||||
this.avatarDecoration ??= null;
|
||||
}
|
||||
|
||||
/**
|
||||
* @typedef {Object} AvatarDecorationData
|
||||
* @property {string} asset The avatar decoration hash
|
||||
@@ -191,6 +180,16 @@ class User extends Base {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The user avatar decoration's hash
|
||||
* @type {?string}
|
||||
* @deprecated Use `avatarDecorationData` instead
|
||||
* Removed in v4
|
||||
*/
|
||||
get avatarDecoration() {
|
||||
return this.avatarDecorationData?.asset || null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether this User is a partial
|
||||
* @type {boolean}
|
||||
@@ -231,13 +230,12 @@ class User extends Base {
|
||||
/**
|
||||
* A link to the user's avatar decoration.
|
||||
* @param {StaticImageURLOptions} [options={}] Options for the image URL
|
||||
* <info> The `format` option is not supported for this image URL</info>
|
||||
* @returns {?string}
|
||||
*/
|
||||
avatarDecorationURL({ format, size } = {}) {
|
||||
if (this.avatarDecorationData) {
|
||||
return this.client.rest.cdn.AvatarDecoration(this.id, this.avatarDecorationData.asset, format, size);
|
||||
}
|
||||
return this.avatarDecoration && this.client.rest.cdn.AvatarDecoration(this.id, this.avatarDecoration, format, size);
|
||||
avatarDecorationURL({ size } = {}) {
|
||||
if (!this.avatarDecorationData) return null;
|
||||
return this.client.rest.cdn.AvatarDecoration(this.avatarDecorationData.asset, size);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -361,7 +359,6 @@ class User extends Base {
|
||||
this.flags?.bitfield === user.flags?.bitfield &&
|
||||
this.banner === user.banner &&
|
||||
this.accentColor === user.accentColor &&
|
||||
this.avatarDecoration === user.avatarDecoration &&
|
||||
this.avatarDecorationData?.asset === user.avatarDecorationData?.asset &&
|
||||
this.avatarDecorationData?.skuId === user.avatarDecorationData?.skuId
|
||||
);
|
||||
@@ -384,7 +381,6 @@ class User extends Base {
|
||||
this.flags?.bitfield === user.public_flags &&
|
||||
('banner' in user ? this.banner === user.banner : true) &&
|
||||
('accent_color' in user ? this.accentColor === user.accent_color : true) &&
|
||||
('avatar_decoration' in user ? this.avatarDecoration === user.avatar_decoration : true) &&
|
||||
('avatar_decoration_data' in user
|
||||
? this.avatarDecorationData?.asset === user.avatar_decoration_data?.asset &&
|
||||
this.avatarDecorationData?.skuId === user.avatar_decoration_data?.sku_id
|
||||
|
||||
Reference in New Issue
Block a user