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
customIdstringThe custom id of the text input.>
styleTextInputStyleThe style of the text input.
placeholderstringThe placeholder of the text input.
minLengthintThe minimum length of the text input's content.
maxLengthintThe maximum length of the text input's content.
initValuestringThe 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; }