mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-09 16:13:31 +01:00
feat: user avatar decorations (#8914)
feat(User): add avatar decorations Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
This commit is contained in:
@@ -96,6 +96,21 @@ export class CDN {
|
||||
return this.dynamicMakeURL(`/avatars/${id}/${avatarHash}`, avatarHash, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a user avatar decoration URL.
|
||||
*
|
||||
* @param userId - The id of the user
|
||||
* @param userAvatarDecoration - The hash provided by Discord for this avatar decoration
|
||||
* @param options - Optional options for the avatar decoration
|
||||
*/
|
||||
public avatarDecoration(
|
||||
userId: string,
|
||||
userAvatarDecoration: string,
|
||||
options?: Readonly<BaseImageURLOptions>,
|
||||
): string {
|
||||
return this.makeURL(`/avatar-decorations/${userId}/${userAvatarDecoration}`, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a banner URL, e.g. for a user or a guild.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user