Preview environment

class CDN

export declare class CDN

The CDN link builder

Constructors

constructor(
base?: string
)

Constructs a new instance of the CDN class

appAsset(
clientId: string
assetHash: string
) : string

Generates an app asset URL for a client's asset.

appIcon(
clientId: string
iconHash: string
) : string

Generates an app icon URL for a client's icon.

avatar(
id: string
avatarHash: string
) : string

Generates an avatar URL, e.g. for a user or a webhook.

avatarDecoration(
userId: string
userAvatarDecoration: string
) : string

Generates a user avatar decoration URL.

Generates a banner URL, e.g. for a user or a guild.

channelIcon(
channelId: string
iconHash: string
) : string

Generates an icon URL for a channel, e.g. a group DM.

defaultAvatar(
index: number
) : string

Generates a default avatar URL

discoverySplash(
guildId: string
splashHash: string
) : string

Generates a discovery splash URL for a guild's discovery splash.

emoji() : string

Generates an emoji's URL for an emoji.

guildMemberAvatar(
guildId: string
userId: string
avatarHash: string
) : string

Generates a guild member avatar URL.

guildMemberBanner(
guildId: string
userId: string
bannerHash: string
) : string

Generates a guild member banner URL.

guildScheduledEventCover(
scheduledEventId: string
coverHash: string
) : string

Generates a cover image for a guild scheduled event.

icon(
id: string
iconHash: string
) : string

Generates an icon URL, e.g. for a guild.

roleIcon(
roleId: string
roleIconHash: string
) : string

Generates a URL for the icon of a role

splash(
guildId: string
splashHash: string
) : string

Generates a guild invite splash URL for a guild's invite splash.

sticker(
stickerId: string
extension?: StickerExtension
) : string

Generates a sticker URL.

stickerPackBanner(
bannerId: string
) : string

Generates a sticker pack banner URL.

teamIcon(
teamId: string
iconHash: string
) : string

Generates a team icon URL for a team's icon.