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)
Create a new ModalTextInputAttribute.
public ModalTextInputAttribute(string customId, TextInputStyle style = TextInputStyle.Short, string placeholder = null, int minLength = 1, int maxLength = 4000, string initValue = null)
Parameters
customId
stringThe custom id of the text input.>
style
TextInputStyleThe style of the text input.
placeholder
stringThe placeholder of the text input.
minLength
intThe minimum length of the text input's content.
maxLength
intThe maximum length of the text input's content.
initValue
stringThe initial value to be displayed by this input.
Properties
ComponentType
Gets the type of the component.
public override ComponentType ComponentType { get; }
Property Value
InitialValue
Gets the initial value to be displayed by this input.
public string InitialValue { get; }
Property Value
MaxLength
Gets the maximum length of the text input.
public int MaxLength { get; }
Property Value
MinLength
Gets the minimum length of the text input.
public int MinLength { get; }
Property Value
Placeholder
Gets the placeholder of the text input.
public string Placeholder { get; }
Property Value
Style
Gets the style of the text input.
public TextInputStyle Style { get; }