Class CDN
Represents a class containing the strings related to various Content Delivery Networks (CDNs).
Assembly: Discord.Net.Core.dll​
View Source​
public static class CDN
Methods​
GetTeamIconUrl(UInt64, String)​
Returns a team icon URL.
View Source​
public static string GetTeamIconUrl(ulong teamId, string iconId)
Returns​
System.String
:
A URL pointing to the team's icon.
Parameters​
Type | Name | Description |
---|---|---|
System.UInt64 | teamId | The team identifier. |
System.String | iconId | The icon identifier. |
GetApplicationIconUrl(UInt64, String)​
Returns an application icon URL.
View Source​
public static string GetApplicationIconUrl(ulong appId, string iconId)
Returns​
System.String
:
A URL pointing to the application's icon.
Parameters​
Type | Name | Description |
---|---|---|
System.UInt64 | appId | The application identifier. |
System.String | iconId | The icon identifier. |
GetUserAvatarUrl(UInt64, String, UInt16, ImageFormat)​
Returns a user avatar URL.
View Source​
public static string GetUserAvatarUrl(ulong userId, string avatarId, ushort size, ImageFormat format)
Returns​
System.String
:
A URL pointing to the user's avatar in the specified size.
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. |
Discord.ImageFormat | format | The format to return. |
GetGuildUserAvatarUrl(UInt64, UInt64, String, UInt16, ImageFormat)​
View Source​
public static string GetGuildUserAvatarUrl(ulong userId, ulong guildId, string avatarId, ushort size, ImageFormat format)
Returns​
System.String
Parameters​
Type | Name |
---|---|
System.UInt64 | userId |
System.UInt64 | guildId |
System.String | avatarId |
System.UInt16 | size |
Discord.ImageFormat | format |
GetUserBannerUrl(UInt64, String, UInt16, ImageFormat)​
Returns a user banner URL.
View Source​
public static string GetUserBannerUrl(ulong userId, string bannerId, ushort size, ImageFormat format)
Returns​
System.String
:
A URL pointing to the user's banner in the specified size.
Parameters​
Type | Name | Description |
---|---|---|
System.UInt64 | userId | The user snowflake identifier. |
System.String | bannerId | The banner 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. |
Discord.ImageFormat | format | The format to return. |
GetDefaultUserAvatarUrl(UInt16)​
Returns the default user avatar URL.
View Source​
public static string GetDefaultUserAvatarUrl(ushort discriminator)
Returns​
System.String
:
A URL pointing to the user's default avatar when one isn't set.
Parameters​
Type | Name | Description |
---|---|---|
System.UInt16 | discriminator | The discriminator value of a user. |
GetGuildIconUrl(UInt64, String)​
Returns an icon URL.
View Source​
public static string GetGuildIconUrl(ulong guildId, string iconId)
Returns​
System.String
:
A URL pointing to the guild's icon.
Parameters​
Type | Name | Description |
---|---|---|
System.UInt64 | guildId | The guild snowflake identifier. |
System.String | iconId | The icon identifier. |
GetGuildRoleIconUrl(UInt64, String)​
Returns a guild role's icon URL.
View Source​
public static string GetGuildRoleIconUrl(ulong roleId, string roleHash)
Returns​
System.String
:
A URL pointing to the guild role's icon.
Parameters​
Type | Name | Description |
---|---|---|
System.UInt64 | roleId | The role identifier. |
System.String | roleHash | The icon hash. |
GetGuildSplashUrl(UInt64, String)​
Returns a guild splash URL.
View Source​
public static string GetGuildSplashUrl(ulong guildId, string splashId)
Returns​
System.String
:
A URL pointing to the guild's splash.
Parameters​
Type | Name | Description |
---|---|---|
System.UInt64 | guildId | The guild snowflake identifier. |
System.String | splashId | The splash icon identifier. |
GetGuildDiscoverySplashUrl(UInt64, String)​
Returns a guild discovery splash URL.
View Source​
public static string GetGuildDiscoverySplashUrl(ulong guildId, string discoverySplashId)
Returns​
System.String
:
A URL pointing to the guild's discovery splash.
Parameters​
Type | Name | Description |
---|---|---|
System.UInt64 | guildId | The guild snowflake identifier. |
System.String | discoverySplashId | The discovery splash icon identifier. |
GetChannelIconUrl(UInt64, String)​
Returns a channel icon URL.
View Source​
public static string GetChannelIconUrl(ulong channelId, string iconId)
Returns​
System.String
:
A URL pointing to the channel's icon.
Parameters​
Type | Name | Description |
---|---|---|
System.UInt64 | channelId | The channel snowflake identifier. |
System.String | iconId | The icon identifier. |
GetGuildBannerUrl(UInt64, String, ImageFormat, Nullable<UInt16>)​
Returns a guild banner URL.
View Source​
public static string GetGuildBannerUrl(ulong guildId, string bannerId, ImageFormat format, ushort? size = null)
Returns​
System.String
:
A URL pointing to the guild's banner image.
Parameters​
Type | Name | Description |
---|---|---|
System.UInt64 | guildId | The guild snowflake identifier. |
System.String | bannerId | The banner image identifier. |
Discord.ImageFormat | format | The format to return. |
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. |
GetEmojiUrl(UInt64, Boolean)​
Returns an emoji URL.
View Source​
public static string GetEmojiUrl(ulong emojiId, bool animated)
Returns​
System.String
:
A URL pointing to the custom emote.
Parameters​
Type | Name | Description |
---|---|---|
System.UInt64 | emojiId | The emoji snowflake identifier. |
System.Boolean | animated | Whether this emoji is animated. |
GetRichAssetUrl(UInt64, String, UInt16, ImageFormat)​
Returns a Rich Presence asset URL.
View Source​
public static string GetRichAssetUrl(ulong appId, string assetId, ushort size, ImageFormat format)
Returns​
System.String
:
A URL pointing to the asset image in the specified size.
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. |
Discord.ImageFormat | format | The format to return. |
GetSpotifyAlbumArtUrl(String)​
Returns a Spotify album URL.
View Source​
public static string GetSpotifyAlbumArtUrl(string albumArtId)
Returns​
System.String
:
A URL pointing to the Spotify album art.
Parameters​
Type | Name | Description |
---|---|---|
System.String | albumArtId | The identifier for the album art (e.g. 6be8f4c8614ecf4f1dd3ebba8d8692d8ce4951ac). |
GetSpotifyDirectUrl(String)​
Returns a Spotify direct URL for a track.
View Source​
public static string GetSpotifyDirectUrl(string trackId)
Returns​
System.String
:
A URL pointing to the Spotify track.
Parameters​
Type | Name | Description |
---|---|---|
System.String | trackId | The identifier for the track (e.g. 4uLU6hMCjMI75M1A2tKUQC). |
GetStickerUrl(UInt64, StickerFormatType)​
Gets a stickers url based off the id and format.
View Source​
public static string GetStickerUrl(ulong stickerId, StickerFormatType format = StickerFormatType.Png)
Returns​
System.String
:
A URL to the sticker.
Parameters​
Type | Name | Description |
---|---|---|
System.UInt64 | stickerId | The id of the sticker. |
Discord.StickerFormatType | format | The format of the sticker. |