Class DiscordEmbedBuilder
- Namespace
- DisCatSharp.Entities
- Assembly
- DisCatSharp.dll
Constructs embeds.
public sealed class DiscordEmbedBuilder
- Inheritance
-
DiscordEmbedBuilder
- Inherited Members
Constructors
- DiscordEmbedBuilder()
Constructs a new empty embed builder.
- DiscordEmbedBuilder(DiscordEmbed)
Constructs a new embed builder using another embed as prototype.
Properties
- Author
Gets or sets the embed's author.
- Color
Gets or sets the embed's color.
- Description
Gets or sets the embed's description.
- Fields
Gets the embed's fields.
- Footer
Gets or sets the embed's footer.
- ImageUrl
Gets or sets the embed's image url.
- Thumbnail
Gets or sets the embed's thumbnail.
- Timestamp
Gets or sets the embed's timestamp.
- Title
Gets or sets the embed's title.
- Url
Gets or sets the url for the embed's title.
Methods
- AddField(DiscordEmbedField)
Adds a field to this embed.
- AddFields(params DiscordEmbedField[])
Adds multiple fields to this embed.
- AddFields(IEnumerable<DiscordEmbedField>)
Adds multiple fields to this embed.
- Build()
Constructs a new embed from data supplied to this builder.
- ClearFields()
Removes all fields from this embed.
- RemoveField(DiscordEmbedField)
Removes a field from this embed, if it is part of it.
- RemoveFieldAt(int)
Removes a field of the specified index from this embed.
- RemoveFieldRange(int, int)
Removes fields of the specified range from this embed.
- RemoveFields(params DiscordEmbedField[])
Removes multiple fields from this embed, if they are part of it.
- RemoveFields(IEnumerable<DiscordEmbedField>)
Removes multiple fields from this embed, if they are part of it.
- WithAuthor(string, string, string)
Sets the embed's author.
- WithColor(DiscordColor)
Sets the embed's color.
- WithDescription(string)
Sets the embed's description.
- WithFooter(string, string)
Sets the embed's footer.
- WithImageUrl(string)
Sets the embed's image url.
- WithImageUrl(Uri)
Sets the embed's image url.
- WithThumbnail(string, int, int)
Sets the embed's thumbnail.
- WithThumbnail(Uri, int, int)
Sets the embed's thumbnail.
- WithTimestamp(DateTimeOffset?)
Sets the embed's timestamp.
- WithTimestamp(DateTime?)
Sets the embed's timestamp.
- WithTimestamp(ulong)
Sets the embed's timestamp based on a snowflake.
- WithTitle(string)
Sets the embed's title.
- WithUrl(string)
Sets the embed's title url.
- WithUrl(Uri)
Sets the embed's title url.
Operators
- implicit operator DiscordEmbed(DiscordEmbedBuilder)
Implicitly converts this builder to an embed.