Discore
Show / Hide Table of Contents

Class DiscordCdnUrl

A URL builder for Discord CDN resources.

Inheritance
object
DiscordCdnUrl
Implements
IEquatable<DiscordCdnUrl>
Inherited Members
object.Equals(object, object)
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
Namespace: Discore
Assembly: Discore.dll
Syntax
public class DiscordCdnUrl : IEquatable<DiscordCdnUrl?>

Fields

Name Description
CdnBaseUrl

The base URL for all Discord CDN resources.

Properties

Name Description
BaseUrl

Gets the computed base URL for any image derived from this CDN URL (e.g. "avatars/{userId}/{avatarHash}").

Does not include CdnBaseUrl.
FileName

Gets the original file name provided by the API. This is usually a hash of the resource.

ResourceId

Gets the ID of the resource this URL is for (e.g. user ID, guild ID, etc.) or null if there is no resource ID (e.g. a default user avatar).

Type

Gets the type of resource this URL is pointing to.

Methods

Name Description
BuildUrl(string, int?)

Gets the complete URL with the specified extension and size.

Equals(DiscordCdnUrl?)
Equals(object?)
ForAchievementIcon(Snowflake, long, string)

Creates a CDN URL builder for an achievement icon.

ForApplicationAsset(Snowflake, string)

Creates a CDN URL builder for an application asset.

ForApplicationCover(Snowflake, string)

Creates a CDN URL builder for an application cover.

ForApplicationIcon(Snowflake, string)

Creates a CDN URL builder for an application icon.

ForCustomEmoji(Snowflake)

Creates a CDN URL builder for custom emojis.

ForDefaultUserAvatar(string)

Creates a CDN URL builder for a default user avatar.

ForGuildBanner(Snowflake, string)

Creates a CDN URL builder for guild banners.

ForGuildIcon(Snowflake, string)

Creates a CDN URL builder for guild icons.

ForGuildSplash(Snowflake, string)

Creates a CDN URL builder for guild splashes.

ForRoleIcon(Snowflake, string)

Creates a CDN URL builder for a role icon.

ForSticker(Snowflake)

Creates a CDN URL builder for a sticker.

ForStickerPackBanner(string)

Creates a CDN URL builder for a sticker pack banner.

ForTeamIcon(Snowflake, string)

Creates a CDN URL builder for a team icon.

ForUserAvatar(Snowflake, string)

Creates a CDN URL builder for a user avatar.

GetHashCode()
ToString()

Operators

Name Description
operator ==(DiscordCdnUrl?, DiscordCdnUrl?)
operator !=(DiscordCdnUrl?, DiscordCdnUrl?)
  • Improve this Doc
  • View Source
In This Article
Back to top Generated by DocFX