The CDN link builder
Generates an app asset URL for a client's asset.
| Name | Type | Optional | Description | 
|---|---|---|---|
| clientId | string | No | The client id that has the asset  | 
| assetHash | string | No | The hash provided by Discord for this asset  | 
| options | Readonly<BaseImageURLOptions> | Yes | Optional options for the asset  | 
Generates an app icon URL for a client's icon.
| Name | Type | Optional | Description | 
|---|---|---|---|
| clientId | string | No | The client id that has the icon  | 
| iconHash | string | No | The hash provided by Discord for this icon  | 
| options | Readonly<BaseImageURLOptions> | Yes | Optional options for the icon  | 
Generates an avatar URL, e.g. for a user or a webhook.
| Name | Type | Optional | Description | 
|---|---|---|---|
| id | string | No | The id that has the icon  | 
| avatarHash | string | No | The hash provided by Discord for this avatar  | 
| options | Readonly<ImageURLOptions> | Yes | Optional options for the avatar  | 
Generates a user avatar decoration preset URL.
| Name | Type | Optional | Description | 
|---|---|---|---|
| asset | string | No | The avatar decoration hash  | 
Generates a banner URL, e.g. for a user or a guild.
| Name | Type | Optional | Description | 
|---|---|---|---|
| id | string | No | The id that has the banner splash  | 
| bannerHash | string | No | The hash provided by Discord for this banner  | 
| options | Readonly<ImageURLOptions> | Yes | Optional options for the banner  | 
Generates an icon URL for a channel, e.g. a group DM.
| Name | Type | Optional | Description | 
|---|---|---|---|
| channelId | string | No | The channel id that has the icon  | 
| iconHash | string | No | The hash provided by Discord for this channel  | 
| options | Readonly<BaseImageURLOptions> | Yes | Optional options for the icon  | 
Generates a default avatar URL
Remarks
To calculate the index for a user do 
(userId >> 22) % 6, or discriminator % 5 if they're using the legacy username system.| Name | Type | Optional | Description | 
|---|---|---|---|
| index | number | No | The default avatar index  | 
Generates a discovery splash URL for a guild's discovery splash.
| Name | Type | Optional | Description | 
|---|---|---|---|
| guildId | string | No | The guild id that has the discovery splash  | 
| splashHash | string | No | The hash provided by Discord for this splash  | 
| options | Readonly<BaseImageURLOptions> | Yes | Optional options for the splash  | 
Generates an emoji's URL.
| Name | Type | Optional | Description | 
|---|---|---|---|
| emojiId | string | No | The emoji id  | 
| animated | boolean | No | Whether the emoji is animated  | 
| options | Readonly<ImageURLOptions> | Yes | Optional options for the emoji  | 
Generates a guild member avatar URL.
| Name | Type | Optional | Description | 
|---|---|---|---|
| guildId | string | No | The id of the guild  | 
| userId | string | No | The id of the user  | 
| avatarHash | string | No | The hash provided by Discord for this avatar  | 
| options | Readonly<ImageURLOptions> | Yes | Optional options for the avatar  | 
Generates a guild member banner URL.
| Name | Type | Optional | Description | 
|---|---|---|---|
| guildId | string | No | The id of the guild  | 
| userId | string | No | The id of the user  | 
| bannerHash | string | No | The hash provided by Discord for this banner  | 
| options | Readonly<ImageURLOptions> | Yes | Optional options for the banner  | 
Generates a cover image for a guild scheduled event.
| Name | Type | Optional | Description | 
|---|---|---|---|
| scheduledEventId | string | No | The scheduled event id  | 
| coverHash | string | No | The hash provided by discord for this cover image  | 
| options | Readonly<BaseImageURLOptions> | Yes | Optional options for the cover image  | 
Generates an icon URL, e.g. for a guild.
| Name | Type | Optional | Description | 
|---|---|---|---|
| id | string | No | The id that has the icon splash  | 
| iconHash | string | No | The hash provided by Discord for this icon  | 
| options | Readonly<ImageURLOptions> | Yes | Optional options for the icon  | 
Generates a URL for the icon of a role
| Name | Type | Optional | Description | 
|---|---|---|---|
| roleId | string | No | The id of the role that has the icon  | 
| roleIconHash | string | No | The hash provided by Discord for this role icon  | 
| options | Readonly<BaseImageURLOptions> | Yes | Optional options for the role icon  | 
Generates a URL for a soundboard sound.
| Name | Type | Optional | Description | 
|---|---|---|---|
| soundId | string | No | The soundboard sound id  | 
Generates a guild invite splash URL for a guild's invite splash.
| Name | Type | Optional | Description | 
|---|---|---|---|
| guildId | string | No | The guild id that has the invite splash  | 
| splashHash | string | No | The hash provided by Discord for this splash  | 
| options | Readonly<BaseImageURLOptions> | Yes | Optional options for the splash  | 
Generates a sticker URL.
| Name | Type | Optional | Description | 
|---|---|---|---|
| stickerId | string | No | The sticker id  | 
| extension | StickerExtension | Yes | The extension of the sticker  | 
Generates a sticker pack banner URL.
| Name | Type | Optional | Description | 
|---|---|---|---|
| bannerId | string | No | The banner id  | 
| options | Readonly<BaseImageURLOptions> | Yes | Optional options for the banner  | 
Generates a team icon URL for a team's icon.
| Name | Type | Optional | Description | 
|---|---|---|---|
| teamId | string | No | The team id that has the icon  | 
| iconHash | string | No | The hash provided by Discord for this icon  | 
| options | Readonly<BaseImageURLOptions> | Yes | Optional options for the icon  |