Skip to main content

Class EmbedBuilderExtensions

An extension class for building an embed.

Assembly: Discord.Net.Core.dll​
View Source​
Declaration
public static class EmbedBuilderExtensions

Methods​

WithColor(EmbedBuilder, UInt32)​

Adds embed color based on the provided raw value.

View Source​
Declaration
public static EmbedBuilder WithColor(this EmbedBuilder builder, uint rawValue)
Returns​

Discord.EmbedBuilder

Parameters​
TypeName
Discord.EmbedBuilderbuilder
System.UInt32rawValue

WithColor(EmbedBuilder, Byte, Byte, Byte)​

Adds embed color based on the provided RGB System.Byte value.

View Source​
Declaration
public static EmbedBuilder WithColor(this EmbedBuilder builder, byte r, byte g, byte b)
Returns​

Discord.EmbedBuilder

Parameters​
TypeName
Discord.EmbedBuilderbuilder
System.Byter
System.Byteg
System.Byteb

WithColor(EmbedBuilder, Int32, Int32, Int32)​

Adds embed color based on the provided RGB System.Int32 value.

View Source​
Declaration
public static EmbedBuilder WithColor(this EmbedBuilder builder, int r, int g, int b)
Returns​

Discord.EmbedBuilder

Parameters​
TypeName
Discord.EmbedBuilderbuilder
System.Int32r
System.Int32g
System.Int32b

WithColor(EmbedBuilder, Single, Single, Single)​

Adds embed color based on the provided RGB System.Single value.

View Source​
Declaration
public static EmbedBuilder WithColor(this EmbedBuilder builder, float r, float g, float b)
Returns​

Discord.EmbedBuilder

Parameters​
TypeName
Discord.EmbedBuilderbuilder
System.Singler
System.Singleg
System.Singleb

WithAuthor(EmbedBuilder, IUser)​

Fills the embed author field with the provided user's full username and avatar URL.

View Source​
Declaration
public static EmbedBuilder WithAuthor(this EmbedBuilder builder, IUser user)
Returns​

Discord.EmbedBuilder

Parameters​
TypeName
Discord.EmbedBuilderbuilder
Discord.IUseruser

ToEmbedBuilder(IEmbed)​

Converts a Discord.EmbedType.Rich Discord.IEmbed object to a Discord.EmbedBuilder.

View Source​
Declaration
public static EmbedBuilder ToEmbedBuilder(this IEmbed embed)
Returns​

Discord.EmbedBuilder

Parameters​
TypeName
Discord.IEmbedembed

WithFields(EmbedBuilder, IEnumerable<EmbedFieldBuilder>)​

Adds the specified fields into this Discord.EmbedBuilder.

View Source​
Declaration
public static EmbedBuilder WithFields(this EmbedBuilder builder, IEnumerable<EmbedFieldBuilder> fields)
Returns​

Discord.EmbedBuilder

Parameters​
TypeName
Discord.EmbedBuilderbuilder
System.Collections.Generic.IEnumerable<Discord.EmbedFieldBuilder>fields

WithFields(EmbedBuilder, EmbedFieldBuilder[])​

Adds the specified fields into this Discord.EmbedBuilder.

View Source​
Declaration
public static EmbedBuilder WithFields(this EmbedBuilder builder, params EmbedFieldBuilder[] fields)
Returns​

Discord.EmbedBuilder

Parameters​
TypeName
Discord.EmbedBuilderbuilder
Discord.EmbedFieldBuilder[]fields