Table of Contents

Class EmbedProperties

Namespace
NetCord.Rest
Assembly
NetCord.dll

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

EmbedAuthorProperties

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

Color

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

string

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

IEnumerable<EmbedFieldProperties>

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

EmbedFooterProperties

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

EmbedImageProperties

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

EmbedThumbnailProperties

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

DateTimeOffset?

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

string

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

string

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

fields IEnumerable<EmbedFieldProperties>

Returns

EmbedProperties

WithAuthor(EmbedAuthorProperties?)

Contains the author block, always located at the top of the embed.

public EmbedProperties WithAuthor(EmbedAuthorProperties? author)

Parameters

author EmbedAuthorProperties

Returns

EmbedProperties

WithColor(Color)

The color of the embed's border in an RGB format.

public EmbedProperties WithColor(Color color)

Parameters

color Color

Returns

EmbedProperties

WithDescription(string?)

The part of the embed where the main text is contained, limited to 4096 characters.

public EmbedProperties WithDescription(string? description)

Parameters

description string

Returns

EmbedProperties

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

fields IEnumerable<EmbedFieldProperties>

Returns

EmbedProperties

WithFooter(EmbedFooterProperties?)

The text at the bottom of the embed, limited to 2048 characters.

public EmbedProperties WithFooter(EmbedFooterProperties? footer)

Parameters

footer EmbedFooterProperties

Returns

EmbedProperties

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

image EmbedImageProperties

Returns

EmbedProperties

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

thumbnail EmbedThumbnailProperties

Returns

EmbedProperties

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

timestamp DateTimeOffset?

Returns

EmbedProperties

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

title string

Returns

EmbedProperties

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

url string

Returns

EmbedProperties