Skip to content

Commit

Permalink
feat(rest): add guild member banner cdn url (#7973)
Browse files Browse the repository at this point in the history
  • Loading branch information
suneettipirneni authored Jun 4, 2022
1 parent d60c464 commit 97eaab3
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/rest/src/lib/CDN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,22 @@ export class CDN {
return this.dynamicMakeURL(`/guilds/${guildId}/users/${userId}/avatars/${avatarHash}`, avatarHash, options);
}

/**
* Generates a guild member banner URL.
* @param guildId The id of the guild
* @param userId The id of the user
* @param bannerHash The hash provided by Discord for this banner
* @param options Optional options for the banner
*/
public guildMemberBanner(
guildId: string,
userId: string,
bannerHash: string,
options?: Readonly<ImageURLOptions>,
): string {
return this.dynamicMakeURL(`/guilds/${guildId}/users/${userId}/banner`, bannerHash, options);
}

/**
* Generates an icon URL, e.g. for a guild.
* @param id The id that has the icon splash
Expand Down

0 comments on commit 97eaab3

Please sign in to comment.