diff --git a/NetCord/EmbedAuthor.cs b/NetCord/EmbedAuthor.cs index e1db15a46..ba7eabec3 100644 --- a/NetCord/EmbedAuthor.cs +++ b/NetCord/EmbedAuthor.cs @@ -1,17 +1,34 @@ namespace NetCord; +/// +/// Contains information about the author of an embed, used to render the author block. +/// public class EmbedAuthor : IJsonModel { JsonModels.JsonEmbedAuthor IJsonModel.JsonModel => _jsonModel; private readonly JsonModels.JsonEmbedAuthor _jsonModel; - public EmbedAuthor(JsonModels.JsonEmbedAuthor jsonModel) { _jsonModel = jsonModel; } - + + /// + /// The name of the author, displayed next to the icon if one is specified in . + /// public string? Name => _jsonModel.Name; + + /// + /// When set, turns the into a clickable link, pointing to the specified URL. + /// public string? Url => _jsonModel.Url; + + /// + /// Points to an image, which is displayed in a small circular format to the left of the . + /// public string? IconUrl => _jsonModel.IconUrl; + + /// + /// The URL of the icon image, proxied by the Discord CDN server. + /// public string? ProxyIconUrl => _jsonModel.ProxyIconUrl; } diff --git a/NetCord/EmbedField.cs b/NetCord/EmbedField.cs index d4adc3174..4e32a2cec 100644 --- a/NetCord/EmbedField.cs +++ b/NetCord/EmbedField.cs @@ -1,16 +1,29 @@ namespace NetCord; +/// +/// Contains information about an embed field, of which a maximum of 25 can be set per embed. +/// public class EmbedField : IJsonModel { JsonModels.JsonEmbedField IJsonModel.JsonModel => _jsonModel; private readonly JsonModels.JsonEmbedField _jsonModel; - public EmbedField(JsonModels.JsonEmbedField jsonModel) { _jsonModel = jsonModel; } + /// + /// Equivalent to but localised to a field, limited to 256 characters. + /// public string Name => _jsonModel.Name; + + /// + /// Equivalent to but localised to a field, limited to 1024 characters. + /// public string Value => _jsonModel.Value; + + /// + /// When set alongside another field with set, displays the fields side by side. + /// public bool Inline => _jsonModel.Inline; } diff --git a/NetCord/EmbedFooter.cs b/NetCord/EmbedFooter.cs index 01e318d1d..4ffa39e91 100644 --- a/NetCord/EmbedFooter.cs +++ b/NetCord/EmbedFooter.cs @@ -1,16 +1,29 @@ namespace NetCord; +/// +/// Contains information used to render the footer block of an embed. +/// public class EmbedFooter : IJsonModel { JsonModels.JsonEmbedFooter IJsonModel.JsonModel => _jsonModel; private readonly JsonModels.JsonEmbedFooter _jsonModel; - public EmbedFooter(JsonModels.JsonEmbedFooter jsonModel) { _jsonModel = jsonModel; } + /// + /// The text displayed in the footer, to the right of the icon if one is set, limited to 2048 characters. + /// public string Text => _jsonModel.Text; + + /// + /// Points to an image, which is displayed in a small circular format to the left of the . + /// public string? IconUrl => _jsonModel.IconUrl; + + /// + /// The URL of the icon image, proxied by the Discord CDN server. + /// public string? ProxyIconUrl => _jsonModel.ProxyIconUrl; } diff --git a/NetCord/EmbedImage.cs b/NetCord/EmbedImage.cs index 13e49e92e..cd293368e 100644 --- a/NetCord/EmbedImage.cs +++ b/NetCord/EmbedImage.cs @@ -1,5 +1,8 @@ namespace NetCord; +/// +/// Contains information used for the rendering and display of images in embeds. +/// public class EmbedImage : IJsonModel { JsonModels.JsonEmbedImage IJsonModel.JsonModel => _jsonModel; @@ -10,8 +13,23 @@ public EmbedImage(JsonModels.JsonEmbedImage jsonModel) _jsonModel = jsonModel; } + /// + /// The URL of the image displayed in the embed. + /// public string? Url => _jsonModel.Url; + + /// + /// The URL of the image, proxied by the Discord CDN server. + /// public string? ProxyUrl => _jsonModel.ProxyUrl; + + /// + /// The height of the image in pixels. + /// public int? Height => _jsonModel.Height; + + /// + /// The width of the image in pixels. + /// public int? Width => _jsonModel.Width; } diff --git a/NetCord/EmbedProvider.cs b/NetCord/EmbedProvider.cs index 1830e1557..a3336a572 100644 --- a/NetCord/EmbedProvider.cs +++ b/NetCord/EmbedProvider.cs @@ -1,15 +1,24 @@ namespace NetCord; +/// +/// Contains information used to display the provider tag at the top of an embed. +/// public class EmbedProvider : IJsonModel { JsonModels.JsonEmbedProvider IJsonModel.JsonModel => _jsonModel; private readonly JsonModels.JsonEmbedProvider _jsonModel; - public EmbedProvider(JsonModels.JsonEmbedProvider jsonModel) { _jsonModel = jsonModel; } + /// + /// The name of the provider, displayed at the top of the embed. + /// public string? Name => _jsonModel.Name; + + /// + /// When set, turns the into a clickable link, pointing to the base of the specified URL. + /// public string? Url => _jsonModel.Url; } diff --git a/NetCord/EmbedThumbnail.cs b/NetCord/EmbedThumbnail.cs index dd7f4008e..124f6afb6 100644 --- a/NetCord/EmbedThumbnail.cs +++ b/NetCord/EmbedThumbnail.cs @@ -1,17 +1,34 @@ namespace NetCord; +/// +/// Contains information used for the rendering and display of thumbnails in embeds. +/// public class EmbedThumbnail : IJsonModel { JsonModels.JsonEmbedThumbnail IJsonModel.JsonModel => _jsonModel; private readonly JsonModels.JsonEmbedThumbnail _jsonModel; - public EmbedThumbnail(JsonModels.JsonEmbedThumbnail jsonModel) { _jsonModel = jsonModel; } + /// + /// The URL of the image displayed as the thumbnail in the embed. + /// public string? Url => _jsonModel.Url; + + /// + /// The URL of the image displayed as the thumbnail in the embed, proxied by the Discord CDN server. + /// public string? ProxyUrl => _jsonModel.ProxyUrl; + + /// + /// The height of the image in pixels. + /// public int? Height => _jsonModel.Height; + + /// + /// The width of the image in pixels. + /// public int? Width => _jsonModel.Width; } diff --git a/NetCord/EmbedVideo.cs b/NetCord/EmbedVideo.cs index c2551072d..03d17935e 100644 --- a/NetCord/EmbedVideo.cs +++ b/NetCord/EmbedVideo.cs @@ -1,17 +1,34 @@ namespace NetCord; +/// +/// Contains information used for the rendering and display of videos in embeds. +/// public class EmbedVideo : IJsonModel { JsonModels.JsonEmbedVideo IJsonModel.JsonModel => _jsonModel; private readonly JsonModels.JsonEmbedVideo _jsonModel; - public EmbedVideo(JsonModels.JsonEmbedVideo jsonModel) { _jsonModel = jsonModel; } + /// + /// The URL of the video displayed in the embed. + /// public string? Url => _jsonModel.Url; + + /// + /// The URL of the video displayed in the embed, proxied by the Discord CDN server. + /// public string? ProxyUrl => _jsonModel.ProxyUrl; + + /// + /// The height of the video in pixels. + /// public int? Height => _jsonModel.Height; + + /// + /// The width of the video in pixels. + /// public int? Width => _jsonModel.Width; }