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:
Almeida
2023-07-13 21:33:38 +01:00
committed by GitHub
parent ceab07bec8
commit 8d97017458
3 changed files with 36 additions and 0 deletions

View File

@@ -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.
*