Class EmbedFieldBuilder
- Namespace
- Fluxer.Net
- Assembly
- Fluxer.Net.dll
A builder for creating embed fields with validation. Based on Fluxer.Net's EmbedFieldBuilder implementation.
public class EmbedFieldBuilder
- Inheritance
-
objectEmbedFieldBuilder
Properties
IsInline
Gets or sets whether the field should be inline.
public bool IsInline { get; set; }
Property Value
MaxFieldNameLength
Maximum length of the field name.
public static int MaxFieldNameLength { get; }
Property Value
MaxFieldValueLength
Maximum length of the field value.
public static int MaxFieldValueLength { get; }
Property Value
Name
Gets or sets the name of the field.
public string? Name { get; set; }
Property Value
Exceptions
- ArgumentException
Name length exceeds MaxFieldNameLength.
Value
Gets or sets the value of the field.
public string? Value { get; set; }
Property Value
Exceptions
- ArgumentException
Value length exceeds MaxFieldValueLength.
Methods
Build()
Builds the embed field.
public EmbedFieldRequest Build()
Returns
- EmbedFieldRequest
A new Fluxer.Net.EmbedFieldJson object.
Exceptions
- InvalidOperationException
Name or Value is null or empty.
WithIsInline(bool)
Sets whether the field should be inline.
public EmbedFieldBuilder WithIsInline(bool isInline)
Parameters
isInlinebool
Returns
WithName(string)
Sets the name of the field.
public EmbedFieldBuilder WithName(string name)
Parameters
namestring
Returns
WithValue(object)
Sets the value of the field.
public EmbedFieldBuilder WithValue(object value)
Parameters
valueobject