Table of Contents

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
object
EmbedFieldBuilder

Properties

IsInline

Gets or sets whether the field should be inline.

public bool IsInline { get; set; }

Property Value

bool

MaxFieldNameLength

Maximum length of the field name.

public static int MaxFieldNameLength { get; }

Property Value

int

MaxFieldValueLength

Maximum length of the field value.

public static int MaxFieldValueLength { get; }

Property Value

int

Name

Gets or sets the name of the field.

public string? Name { get; set; }

Property Value

string

Exceptions

ArgumentException

Name length exceeds MaxFieldNameLength.

Value

Gets or sets the value of the field.

public string? Value { get; set; }

Property Value

string

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

isInline bool

Whether the field should be inline.

Returns

EmbedFieldBuilder

The current builder.

WithName(string)

Sets the name of the field.

public EmbedFieldBuilder WithName(string name)

Parameters

name string

The name to set.

Returns

EmbedFieldBuilder

The current builder.

WithValue(object)

Sets the value of the field.

public EmbedFieldBuilder WithValue(object value)

Parameters

value object

The value to set.

Returns

EmbedFieldBuilder

The current builder.