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
ModalBuilderParent 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
Instance
protected override TextInputComponentBuilder Instance { get; }
Property Value
MaxLength
Gets and sets the maximum length of the text input.
public int MaxLength { get; set; }
Property Value
MinLength
Gets and sets the minimum length of the text input.
public int MinLength { get; set; }
Property Value
Placeholder
Gets and sets the placeholder of the text input.
public string Placeholder { get; set; }
Property Value
Style
Gets and sets the style of the text input.
public TextInputStyle Style { get; set; }
Property Value
Methods
WithInitialValue(string)
Sets InitialValue.
public TextInputComponentBuilder WithInitialValue(string value)
Parameters
value
stringNew value of the InitialValue.
Returns
- TextInputComponentBuilder
The builder instance.
WithMaxLength(int)
Sets MaxLength.
public TextInputComponentBuilder WithMaxLength(int maxLength)
Parameters
Returns
- TextInputComponentBuilder
The builder instance.
WithMinLength(int)
Sets MinLength.
public TextInputComponentBuilder WithMinLength(int minLength)
Parameters
Returns
- TextInputComponentBuilder
The builder instance.
WithPlaceholder(string)
Sets Placeholder.
public TextInputComponentBuilder WithPlaceholder(string placeholder)
Parameters
placeholder
stringNew value of the Placeholder.
Returns
- TextInputComponentBuilder
The builder instance.
WithStyle(TextInputStyle)
Sets Style.
public TextInputComponentBuilder WithStyle(TextInputStyle style)
Parameters
style
TextInputStyleNew value of the Style.
Returns
- TextInputComponentBuilder
The builder instance.