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​
Parameters​
Type | Name |
---|---|
Discord.EmbedBuilder | builder |
System.UInt32 | rawValue |
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​
Parameters​
Type | Name |
---|---|
Discord.EmbedBuilder | builder |
System.Byte | r |
System.Byte | g |
System.Byte | b |
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​
Parameters​
Type | Name |
---|---|
Discord.EmbedBuilder | builder |
System.Int32 | r |
System.Int32 | g |
System.Int32 | b |
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​
Parameters​
Type | Name |
---|---|
Discord.EmbedBuilder | builder |
System.Single | r |
System.Single | g |
System.Single | b |
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​
Parameters​
Type | Name |
---|---|
Discord.EmbedBuilder | builder |
Discord.IUser | user |
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​
Parameters​
Type | Name |
---|---|
Discord.IEmbed | embed |
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​
Parameters​
Type | Name |
---|---|
Discord.EmbedBuilder | builder |
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​
Parameters​
Type | Name |
---|---|
Discord.EmbedBuilder | builder |
Discord.EmbedFieldBuilder[] | fields |