Table of Contents

Class TextInputComponentBuilder

Namespace
Discord.Interactions.Builders
Assembly
Discord.Net.Interactions.dll

Represents a builder for creating TextInputComponentInfo.

public class TextInputComponentBuilder : InputComponentBuilder<TextInputComponentInfo, TextInputComponentBuilder>, IInputComponentBuilder
Inheritance
TextInputComponentBuilder
Implements
Inherited Members

Constructors

TextInputComponentBuilder(ModalBuilder)

Initializes a new TextInputComponentBuilder.

public TextInputComponentBuilder(ModalBuilder modal)

Parameters

modal ModalBuilder

Parent modal of this component.

Properties

InitialValue

Gets and sets the initial value to be displayed by this input.

public string InitialValue { get; set; }

Property Value

string

Instance

protected override TextInputComponentBuilder Instance { get; }

Property Value

TextInputComponentBuilder

MaxLength

Gets and sets the maximum length of the text input.

public int MaxLength { get; set; }

Property Value

int

MinLength

Gets and sets the minimum length of the text input.

public int MinLength { get; set; }

Property Value

int

Placeholder

Gets and sets the placeholder of the text input.

public string Placeholder { get; set; }

Property Value

string

Style

Gets and sets the style of the text input.

public TextInputStyle Style { get; set; }

Property Value

TextInputStyle

Methods

WithInitialValue(string)

public TextInputComponentBuilder WithInitialValue(string value)

Parameters

value string

New value of the InitialValue.

Returns

TextInputComponentBuilder

The builder instance.

WithMaxLength(int)

Sets MaxLength.

public TextInputComponentBuilder WithMaxLength(int maxLength)

Parameters

maxLength int

New value of the MaxLength.

Returns

TextInputComponentBuilder

The builder instance.

WithMinLength(int)

Sets MinLength.

public TextInputComponentBuilder WithMinLength(int minLength)

Parameters

minLength int

New value of the MinLength.

Returns

TextInputComponentBuilder

The builder instance.

WithPlaceholder(string)

public TextInputComponentBuilder WithPlaceholder(string placeholder)

Parameters

placeholder string

New value of the Placeholder.

Returns

TextInputComponentBuilder

The builder instance.

WithStyle(TextInputStyle)

Sets Style.

public TextInputComponentBuilder WithStyle(TextInputStyle style)

Parameters

style TextInputStyle

New value of the Style.

Returns

TextInputComponentBuilder

The builder instance.