Class EmbedProperties
Displays embedded content such as an image or URL, alongside a title and various other fields. You can only have up to 10 embeds per message, and the total text of all embeds must be less than or equal to 6000 characters.
public class EmbedProperties
- Inheritance
-
EmbedProperties
- Inherited Members
Constructors
EmbedProperties()
public EmbedProperties()
Properties
Author
Contains the author block, always located at the top of the embed.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("author")]
public EmbedAuthorProperties? Author { get; set; }
Property Value
Color
The color of the embed's border in an RGB format.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("color")]
public Color Color { get; set; }
Property Value
Description
The part of the embed where the main text is contained, limited to 4096 characters.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("description")]
public string? Description { get; set; }
Property Value
Fields
Allows the addition of multiple subtitles with additional content underneath them below the main Title and Description blocks, maximum of 25 per embed.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("fields")]
public IEnumerable<EmbedFieldProperties>? Fields { get; set; }
Property Value
Footer
The text at the bottom of the embed, limited to 2048 characters.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("footer")]
public EmbedFooterProperties? Footer { get; set; }
Property Value
Image
The image included in the embed, displayed as a large-sized image located below the Description element.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("image")]
public EmbedImageProperties? Image { get; set; }
Property Value
Thumbnail
The thumbnail of the embed, displayed as a medium-sized image in the top right corner of the embed.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("thumbnail")]
public EmbedThumbnailProperties? Thumbnail { get; set; }
Property Value
Timestamp
Displays time in a format similar to a message timestamp. Located next to the Footer, if one is set.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("timestamp")]
public DateTimeOffset? Timestamp { get; set; }
Property Value
Title
The text that is placed above the description, usually highlighted. Also directs to a URL if one is given in Url, has a 256 character limit.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("title")]
public string? Title { get; set; }
Property Value
Url
A link to an address of a webpage. When set, the Title becomes a clickable link, directing to the URL.
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
[JsonPropertyName("url")]
public string? Url { get; set; }
Property Value
Methods
AddFields(params IEnumerable<EmbedFieldProperties>)
Allows the addition of multiple subtitles with additional content underneath them below the main Title and Description blocks, maximum of 25 per embed.
public EmbedProperties AddFields(params IEnumerable<EmbedFieldProperties> fields)
Parameters
fieldsIEnumerable<EmbedFieldProperties>
Returns
WithAuthor(EmbedAuthorProperties?)
Contains the author block, always located at the top of the embed.
public EmbedProperties WithAuthor(EmbedAuthorProperties? author)
Parameters
authorEmbedAuthorProperties
Returns
WithColor(Color)
The color of the embed's border in an RGB format.
public EmbedProperties WithColor(Color color)
Parameters
colorColor
Returns
WithDescription(string?)
The part of the embed where the main text is contained, limited to 4096 characters.
public EmbedProperties WithDescription(string? description)
Parameters
descriptionstring
Returns
WithFields(IEnumerable<EmbedFieldProperties>?)
Allows the addition of multiple subtitles with additional content underneath them below the main Title and Description blocks, maximum of 25 per embed.
public EmbedProperties WithFields(IEnumerable<EmbedFieldProperties>? fields)
Parameters
fieldsIEnumerable<EmbedFieldProperties>
Returns
WithFooter(EmbedFooterProperties?)
The text at the bottom of the embed, limited to 2048 characters.
public EmbedProperties WithFooter(EmbedFooterProperties? footer)
Parameters
footerEmbedFooterProperties
Returns
WithImage(EmbedImageProperties?)
The image included in the embed, displayed as a large-sized image located below the Description element.
public EmbedProperties WithImage(EmbedImageProperties? image)
Parameters
imageEmbedImageProperties
Returns
WithThumbnail(EmbedThumbnailProperties?)
The thumbnail of the embed, displayed as a medium-sized image in the top right corner of the embed.
public EmbedProperties WithThumbnail(EmbedThumbnailProperties? thumbnail)
Parameters
thumbnailEmbedThumbnailProperties
Returns
WithTimestamp(DateTimeOffset?)
Displays time in a format similar to a message timestamp. Located next to the Footer, if one is set.
public EmbedProperties WithTimestamp(DateTimeOffset? timestamp)
Parameters
timestampDateTimeOffset?
Returns
WithTitle(string?)
The text that is placed above the description, usually highlighted. Also directs to a URL if one is given in Url, has a 256 character limit.
public EmbedProperties WithTitle(string? title)
Parameters
titlestring
Returns
WithUrl(string?)
A link to an address of a webpage. When set, the Title becomes a clickable link, directing to the URL.
public EmbedProperties WithUrl(string? url)
Parameters
urlstring