Table of Contents

Class CDN

Namespace
Discord
Assembly
Discord.Net.Core.dll

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

public static class CDN
Inheritance
CDN
Inherited Members

Methods

GetApplicationIconUrl(ulong, string)

Returns an application icon URL.

public static string GetApplicationIconUrl(ulong appId, string iconId)

Parameters

appId ulong

The application identifier.

iconId string

The icon identifier.

Returns

string

A URL pointing to the application's icon.

GetAvatarDecorationUrl(string)

Gets an avatar decoration url based off the hash.

public static string GetAvatarDecorationUrl(string avatarDecorationHash)

Parameters

avatarDecorationHash string

The hash of the avatar decoraition.

Returns

string

A URL to the avatar decoration.

GetChannelIconUrl(ulong, string)

Returns a channel icon URL.

public static string GetChannelIconUrl(ulong channelId, string iconId)

Parameters

channelId ulong

The channel snowflake identifier.

iconId string

The icon identifier.

Returns

string

A URL pointing to the channel's icon.

GetDefaultUserAvatarUrl(ushort)

Returns the default user avatar URL.

public static string GetDefaultUserAvatarUrl(ushort discriminator)

Parameters

discriminator ushort

The discriminator value of a user.

Returns

string

A URL pointing to the user's default avatar when one isn't set.

GetDefaultUserAvatarUrl(ulong)

Returns the default user avatar URL.

public static string GetDefaultUserAvatarUrl(ulong userId)

Parameters

userId ulong

The Id of a user.

Returns

string

A URL pointing to the user's default avatar when one isn't set.

GetEmojiUrl(ulong, bool)

Returns an emoji URL.

public static string GetEmojiUrl(ulong emojiId, bool animated)

Parameters

emojiId ulong

The emoji snowflake identifier.

animated bool

Whether this emoji is animated.

Returns

string

A URL pointing to the custom emote.

GetEventCoverImageUrl(ulong, ulong, string, ImageFormat, ushort)

Returns an events cover image url. null if the assetId null.

public static string GetEventCoverImageUrl(ulong guildId, ulong eventId, string assetId, ImageFormat format = ImageFormat.Auto, ushort size = 1024)

Parameters

guildId ulong

The guild id that the event is in.

eventId ulong

The id of the event.

assetId string

The id of the cover image asset.

format ImageFormat

The format of the image.

size ushort

The size of the image.

Returns

string

GetGuildBannerUrl(ulong, string, ImageFormat, ushort?)

Returns a guild banner URL.

public static string GetGuildBannerUrl(ulong guildId, string bannerId, ImageFormat format, ushort? size = null)

Parameters

guildId ulong

The guild snowflake identifier.

bannerId string

The banner image identifier.

format ImageFormat

The format to return.

size ushort?

The size of the image to return in horizontal pixels. This can be any power of two between 16 and 2048 inclusive.

Returns

string

A URL pointing to the guild's banner image.

GetGuildDiscoverySplashUrl(ulong, string)

Returns a guild discovery splash URL.

public static string GetGuildDiscoverySplashUrl(ulong guildId, string discoverySplashId)

Parameters

guildId ulong

The guild snowflake identifier.

discoverySplashId string

The discovery splash icon identifier.

Returns

string

A URL pointing to the guild's discovery splash.

GetGuildIconUrl(ulong, string, ushort, ImageFormat)

Returns an icon URL.

public static string GetGuildIconUrl(ulong guildId, string iconId, ushort size = 2048, ImageFormat format = ImageFormat.Auto)

Parameters

guildId ulong

The guild snowflake identifier.

iconId string

The icon identifier.

size ushort

The size of the image to return in horizontal pixels. This can be any power of two between 16 and 2048.

format ImageFormat

The format to return.

Returns

string

A URL pointing to the guild's icon.

GetGuildRoleIconUrl(ulong, string)

Returns a guild role's icon URL.

public static string GetGuildRoleIconUrl(ulong roleId, string roleHash)

Parameters

roleId ulong

The role identifier.

roleHash string

The icon hash.

Returns

string

A URL pointing to the guild role's icon.

GetGuildSplashUrl(ulong, string)

Returns a guild splash URL.

public static string GetGuildSplashUrl(ulong guildId, string splashId)

Parameters

guildId ulong

The guild snowflake identifier.

splashId string

The splash icon identifier.

Returns

string

A URL pointing to the guild's splash.

GetGuildUserAvatarUrl(ulong, ulong, string, ushort, ImageFormat)

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

Parameters

userId ulong
guildId ulong
avatarId string
size ushort
format ImageFormat

Returns

string

GetGuildUserBannerUrl(ulong, ulong, string, ushort, ImageFormat)

public static string GetGuildUserBannerUrl(ulong userId, ulong guildId, string bannerId, ushort size, ImageFormat format)

Parameters

userId ulong
guildId ulong
bannerId string
size ushort
format ImageFormat

Returns

string

GetRichAssetUrl(ulong, string, ushort, ImageFormat)

Returns a Rich Presence asset URL.

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

Parameters

appId ulong

The application identifier.

assetId string

The asset identifier.

size ushort

The size of the image to return in. This can be any power of two between 16 and 2048.

format ImageFormat

The format to return.

Returns

string

A URL pointing to the asset image in the specified size.

GetSpotifyAlbumArtUrl(string)

Returns a Spotify album URL.

public static string GetSpotifyAlbumArtUrl(string albumArtId)

Parameters

albumArtId string

The identifier for the album art (e.g. 6be8f4c8614ecf4f1dd3ebba8d8692d8ce4951ac).

Returns

string

A URL pointing to the Spotify album art.

GetSpotifyDirectUrl(string)

Returns a Spotify direct URL for a track.

public static string GetSpotifyDirectUrl(string trackId)

Parameters

trackId string

The identifier for the track (e.g. 4uLU6hMCjMI75M1A2tKUQC).

Returns

string

A URL pointing to the Spotify track.

GetStickerUrl(ulong, StickerFormatType)

Gets a stickers url based off the id and format.

public static string GetStickerUrl(ulong stickerId, StickerFormatType format = StickerFormatType.Png)

Parameters

stickerId ulong

The id of the sticker.

format StickerFormatType

The format of the sticker.

Returns

string

A URL to the sticker.

GetTeamIconUrl(ulong, string)

Returns a team icon URL.

public static string GetTeamIconUrl(ulong teamId, string iconId)

Parameters

teamId ulong

The team identifier.

iconId string

The icon identifier.

Returns

string

A URL pointing to the team's icon.

GetUserAvatarUrl(ulong, string, ushort, ImageFormat)

Returns a user avatar URL.

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

Parameters

userId ulong

The user snowflake identifier.

avatarId string

The avatar identifier.

size ushort

The size of the image to return in horizontal pixels. This can be any power of two between 16 and 2048.

format ImageFormat

The format to return.

Returns

string

A URL pointing to the user's avatar in the specified size.

GetUserBannerUrl(ulong, string, ushort, ImageFormat)

Returns a user banner URL.

public static string GetUserBannerUrl(ulong userId, string bannerId, ushort size, ImageFormat format)

Parameters

userId ulong

The user snowflake identifier.

bannerId string

The banner identifier.

size ushort

The size of the image to return in horizontal pixels. This can be any power of two between 16 and 2048.

format ImageFormat

The format to return.

Returns

string

A URL pointing to the user's banner in the specified size.