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
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
stringThe 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
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
ushortThe 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
ulongThe 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
Returns
- string
A URL pointing to the custom emote.
GetEventCoverImageUrl(ulong, ulong, string, ImageFormat, ushort)
public static string GetEventCoverImageUrl(ulong guildId, ulong eventId, string assetId, ImageFormat format = ImageFormat.Auto, ushort size = 1024)
Parameters
guildId
ulongThe guild id that the event is in.
eventId
ulongThe id of the event.
assetId
stringThe id of the cover image asset.
format
ImageFormatThe format of the image.
size
ushortThe size of the image.
Returns
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
ulongThe guild snowflake identifier.
bannerId
stringThe banner image identifier.
format
ImageFormatThe 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
ulongThe guild snowflake identifier.
discoverySplashId
stringThe 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
ulongThe guild snowflake identifier.
iconId
stringThe icon identifier.
size
ushortThe size of the image to return in horizontal pixels. This can be any power of two between 16 and 2048.
format
ImageFormatThe 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
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
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
ulongguildId
ulongavatarId
stringsize
ushortformat
ImageFormat
Returns
GetGuildUserBannerUrl(ulong, ulong, string, ushort, ImageFormat)
public static string GetGuildUserBannerUrl(ulong userId, ulong guildId, string bannerId, ushort size, ImageFormat format)
Parameters
userId
ulongguildId
ulongbannerId
stringsize
ushortformat
ImageFormat
Returns
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
ulongThe application identifier.
assetId
stringThe asset identifier.
size
ushortThe size of the image to return in. This can be any power of two between 16 and 2048.
format
ImageFormatThe 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
stringThe 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
stringThe 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
ulongThe id of the sticker.
format
StickerFormatTypeThe 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
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
ulongThe user snowflake identifier.
avatarId
stringThe avatar identifier.
size
ushortThe size of the image to return in horizontal pixels. This can be any power of two between 16 and 2048.
format
ImageFormatThe 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
ulongThe user snowflake identifier.
bannerId
stringThe banner identifier.
size
ushortThe size of the image to return in horizontal pixels. This can be any power of two between 16 and 2048.
format
ImageFormatThe format to return.
Returns
- string
A URL pointing to the user's banner in the specified size.