Class EmbedFieldBuilder
Represents a builder class for an embed field.
Assembly: Discord.Net.Core.dll​
View Source​
Declaration
public class EmbedFieldBuilder
Properties​
Name​
Gets or sets the field name.
View Source​
Declaration
public string Name { get; set; }
Value​
Gets or sets the field value.
View Source​
Declaration
public object Value { get; set; }
IsInline​
Gets or sets a value that indicates whether the field should be in-line with each other.
View Source​
Declaration
public bool IsInline { get; set; }
Fields​
MaxFieldNameLength​
Gets the maximum field length for name allowed by Discord.
View Source​
Declaration
public const int MaxFieldNameLength = 256
MaxFieldValueLength​
Gets the maximum field length for value allowed by Discord.
View Source​
Declaration
public const int MaxFieldValueLength = 1024
Methods​
WithName(String)​
Sets the field name.
View Source​
Declaration
public EmbedFieldBuilder WithName(string name)
Returns​
Discord.EmbedFieldBuilder: The current builder.
Parameters​
Type | Name | Description |
---|---|---|
System.String | name | The name to set the field name to. |
WithValue(Object)​
Sets the field value.
View Source​
Declaration
public EmbedFieldBuilder WithValue(object value)
Returns​
Discord.EmbedFieldBuilder: The current builder.
Parameters​
Type | Name | Description |
---|---|---|
System.Object | value | The value to set the field value to. |
WithIsInline(Boolean)​
Determines whether the field should be in-line with each other.
View Source​
Declaration
public EmbedFieldBuilder WithIsInline(bool isInline)
Returns​
Discord.EmbedFieldBuilder: The current builder.
Parameters​
Type | Name |
---|---|
System.Boolean | isInline |
Build()​
Builds the field builder into a Discord.EmbedField class.
View Source​
Declaration
public EmbedField Build()
Returns​
Discord.EmbedField: The current builder.