Show / Hide Table of Contents

# Class CDN

Represents a class containing the strings related to various Content Delivery Networks (CDNs).

##### Inheritance

System.Object
CDN

##### Inherited Members

System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()

###### Namespace: Discord

###### Assembly: Discord.Net.Core.dll

##### Syntax

    public static class CDN

### Methods

| Improve this Doc View Source

#### GetApplicationIconUrl(UInt64, String)

Returns an application icon URL.

##### Declaration

    public static string GetApplicationIconUrl(ulong appId, string iconId)

##### Parameters

Type | Name | Description
--- | --- | ---
System.UInt64 | appId | The application identifier.
System.String | iconId | The icon identifier.

##### Returns

Type | Description
--- | ---
System.String | A URL pointing to the application's icon.

| Improve this Doc View Source

#### GetChannelIconUrl(UInt64, String)

Returns a channel icon URL.

##### Declaration

    public static string GetChannelIconUrl(ulong channelId, string iconId)

##### Parameters

Type | Name | Description
--- | --- | ---
System.UInt64 | channelId | The channel snowflake identifier.
System.String | iconId | The icon identifier.

##### Returns

Type | Description
--- | ---
System.String | A URL pointing to the channel's icon.

| Improve this Doc View Source

#### GetDefaultUserAvatarUrl(UInt16)

Returns the default user avatar URL.

##### Declaration

    public static string GetDefaultUserAvatarUrl(ushort discriminator)

##### Parameters

Type | Name | Description
--- | --- | ---
System.UInt16 | discriminator | The discriminator value of a user.

##### Returns

Type | Description
--- | ---
System.String | A URL pointing to the user's default avatar when one isn't set.

| Improve this Doc View Source

#### GetEmojiUrl(UInt64, Boolean)

Returns an emoji URL.

##### Declaration

    public static string GetEmojiUrl(ulong emojiId, bool animated)

##### Parameters

Type | Name | Description
--- | --- | ---
System.UInt64 | emojiId | The emoji snowflake identifier.
System.Boolean | animated | Whether this emoji is animated.

##### Returns

Type | Description
--- | ---
System.String | A URL pointing to the custom emote.

| Improve this Doc View Source

#### GetGuildBannerUrl(UInt64, String, Nullable<UInt16>)

Returns a guild banner URL.

##### Declaration

    public static string GetGuildBannerUrl(ulong guildId, string bannerId, ushort? size = default(ushort? ))

##### Parameters

Type | Name | Description
--- | --- | ---
System.UInt64 | guildId | The guild snowflake identifier.
System.String | bannerId | The banner image identifier.
System.Nullable<System.UInt16> | size | The size of the image to return in horizontal pixels. This can be any power of two between 16 and 2048 inclusive.

##### Returns

Type | Description
--- | ---
System.String | A URL pointing to the guild's banner image.

| Improve this Doc View Source

#### GetGuildIconUrl(UInt64, String)

Returns an icon URL.

##### Declaration

    public static string GetGuildIconUrl(ulong guildId, string iconId)

##### Parameters

Type | Name | Description
--- | --- | ---
System.UInt64 | guildId | The guild snowflake identifier.
System.String | iconId | The icon identifier.

##### Returns

Type | Description
--- | ---
System.String | A URL pointing to the guild's icon.

| Improve this Doc View Source

#### GetGuildSplashUrl(UInt64, String)

Returns a guild splash URL.

##### Declaration

    public static string GetGuildSplashUrl(ulong guildId, string splashId)

##### Parameters

Type | Name | Description
--- | --- | ---
System.UInt64 | guildId | The guild snowflake identifier.
System.String | splashId | The splash icon identifier.

##### Returns

Type | Description
--- | ---
System.String | A URL pointing to the guild's icon.

| Improve this Doc View Source

#### GetRichAssetUrl(UInt64, String, UInt16, ImageFormat)

Returns a Rich Presence asset URL.

##### Declaration

    public static string GetRichAssetUrl(ulong appId, string assetId, ushort size, ImageFormat format)

##### Parameters

Type | Name | Description
--- | --- | ---
System.UInt64 | appId | The application identifier.
System.String | assetId | The asset identifier.
System.UInt16 | size | The size of the image to return in. This can be any power of two between 16 and 2048.
ImageFormat | format | The format to return.

##### Returns

Type | Description
--- | ---
System.String | A URL pointing to the asset image in the specified size.

| Improve this Doc View Source

#### GetSpotifyAlbumArtUrl(String)

Returns a Spotify album URL.

##### Declaration

    public static string GetSpotifyAlbumArtUrl(string albumArtId)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | albumArtId | The identifier for the album art (e.g. 6be8f4c8614ecf4f1dd3ebba8d8692d8ce4951ac).

##### Returns

Type | Description
--- | ---
System.String | A URL pointing to the Spotify album art.

| Improve this Doc View Source

#### GetSpotifyDirectUrl(String)

Returns a Spotify direct URL for a track.

##### Declaration

    public static string GetSpotifyDirectUrl(string trackId)

##### Parameters

Type | Name | Description
--- | --- | ---
System.String | trackId | The identifier for the track (e.g. 4uLU6hMCjMI75M1A2tKUQC).

##### Returns

Type | Description
--- | ---
System.String | A URL pointing to the Spotify track.

| Improve this Doc View Source

#### GetUserAvatarUrl(UInt64, String, UInt16, ImageFormat)

Returns a user avatar URL.

##### Declaration

    public static string GetUserAvatarUrl(ulong userId, string avatarId, ushort size, ImageFormat format)

##### Parameters

Type | Name | Description
--- | --- | ---
System.UInt64 | userId | The user snowflake identifier.
System.String | avatarId | The avatar identifier.
System.UInt16 | size | The size of the image to return in horizontal pixels. This can be any power of two between 16 and 2048.
ImageFormat | format | The format to return.

##### Returns

Type | Description
--- | ---
System.String | A URL pointing to the user's avatar in the specified size.