Table of Contents

Class ModalTextInputAttribute

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

Marks a IModal property as a text input.

public sealed class ModalTextInputAttribute : ModalInputAttribute
Inheritance
ModalTextInputAttribute
Inherited Members

Constructors

ModalTextInputAttribute(string, TextInputStyle, string, int, int, string)

public ModalTextInputAttribute(string customId, TextInputStyle style = TextInputStyle.Short, string placeholder = null, int minLength = 1, int maxLength = 4000, string initValue = null)

Parameters

customId string

The custom id of the text input.>

style TextInputStyle

The style of the text input.

placeholder string

The placeholder of the text input.

minLength int

The minimum length of the text input's content.

maxLength int

The maximum length of the text input's content.

initValue string

The initial value to be displayed by this input.

Properties

ComponentType

Gets the type of the component.

public override ComponentType ComponentType { get; }

Property Value

ComponentType

InitialValue

Gets the initial value to be displayed by this input.

public string InitialValue { get; }

Property Value

string

MaxLength

Gets the maximum length of the text input.

public int MaxLength { get; }

Property Value

int

MinLength

Gets the minimum length of the text input.

public int MinLength { get; }

Property Value

int

Placeholder

Gets the placeholder of the text input.

public string Placeholder { get; }

Property Value

string

Style

Gets the style of the text input.

public TextInputStyle Style { get; }

Property Value

TextInputStyle