Show / Hide Table of Contents

Class Embed

Base class for Discord rich embeds. An embed is a message box containing various objects such as Images, Videos, and Authors.

Inheritance
System.Object
Embed
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: Dishooks.Embeds
Assembly: cs.temp.dll.dll
Syntax
public class Embed

Properties

Author

Optional author information. This is shown in the top left of the embed, above the Title.

Declaration
public Author Author { get; set; }
Property Value
Type Description
Author

Color

The color of the embed. If this is null, the default gray color (#202225 or RGB(13,13,15)) will be used.

Declaration
public Color? Color { get; set; }
Property Value
Type Description
System.Nullable<Color>

Description

Description of the embed. This is shown below the Title and Author. This can be up to 4096 characters long, excluding leading and trailing whitespace.

Declaration
public string Description { get; set; }
Property Value
Type Description
System.String

Fields

Optional fields. Up to 20 can be displayed, and they will be shown in the order they are added under the Description.

Declaration
public Field[] Fields { get; set; }
Property Value
Type Description
Field[]

Footer

Optional footer information. This is shown in the bottom left of the embed.

Declaration
public Footer Footer { get; set; }
Property Value
Type Description
Footer

Image

Optional image information. This is shown below the Fields and above the Footer.

Declaration
public Image Image { get; set; }
Property Value
Type Description
Image

Provider

Declaration
public Provider Provider { get; set; }
Property Value
Type Description
Provider

Thumbnail

Optional thumbnail information. This is shown in the top right of the embed.

Declaration
public Thumbnail Thumbnail { get; set; }
Property Value
Type Description
Thumbnail

Timestamp

Timestamp of the embed content, shown in the embed Footer.

Declaration
public DateTime? Timestamp { get; set; }
Property Value
Type Description
System.Nullable<DateTime>

Title

An optional title of the embed. This is shown in the top left of the embed, under the optional Author. If Url is specified, this will be a hyperlink to that URL. This can be up to 1024 characters long, excluding leading and trailing whitespace.

Declaration
public string Title { get; set; }
Property Value
Type Description
System.String

Type

Type of embed (always "rich" for webhook embeds)

Declaration
public string Type { get; set; }
Property Value
Type Description
System.String

Url

Optional URL of the embed. If specified, the Title will be a hyperlink to this URL.

Declaration
public string Url { get; set; }
Property Value
Type Description
System.String

Video

Declaration
public Video Video { get; set; }
Property Value
Type Description
Video

Methods

ToString()

Serialize the embed to a JSON string

Declaration
public override string ToString()
Returns
Type Description
System.String

The JSON string

Overrides
System.Object.ToString()
In This Article
Back to top Generated by DocFX