mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 17:43:30 +01:00
feat: support user guilds (#10962)
* feat: support user guilds * chore: add cdn test * chore: suggested changes * refactor: move to user primary guild to its own class * docs: update description of `badgeHash` parameter * chore: export UserPrimaryGuild * refactor: revert to no `UserPrimaryGuild` * fix: use key in data * fix: both `in` and is truthy check * docs: remove `-` Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com> --------- Co-authored-by: Jiralite <33201955+Jiralite@users.noreply.github.com>
This commit is contained in:
@@ -340,6 +340,17 @@ export class CDN {
|
||||
return `${this.cdn}${CDNRoutes.soundboardSound(soundId)}`;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a URL for a guild tag badge.
|
||||
*
|
||||
* @param guildId - The guild id
|
||||
* @param badgeHash - The hash of the badge
|
||||
* @param options - Optional options for the badge
|
||||
*/
|
||||
public guildTagBadge(guildId: string, badgeHash: string, options?: Readonly<BaseImageURLOptions>): string {
|
||||
return this.makeURL(`/guild-tag-badges/${guildId}/${badgeHash}`, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs the URL for the resource, checking whether or not `hash` starts with `a_` if `dynamic` is set to `true`.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user