Class ModalTextInputAttribute
Marks a IModal property as a text input.
Inherited Members
Namespace: Discord.Interactions
Assembly: Discord.Net.Interactions.dll
Syntax
public sealed class ModalTextInputAttribute : ModalInputAttribute
Constructors
| Improve this Doc View SourceModalTextInputAttribute(String, TextInputStyle, String, Int32, Int32, String)
Create a new ModalTextInputAttribute.
Declaration
public ModalTextInputAttribute(string customId, TextInputStyle style = default(TextInputStyle), string placeholder = null, int minLength = 1, int maxLength = 4000, string initValue = null)
Parameters
Type | Name | Description |
---|---|---|
String | customId | The custom id of the text input.> |
TextInputStyle | style | The style of the text input. |
String | placeholder | The placeholder of the text input. |
Int32 | minLength | The minimum length of the text input's content. |
Int32 | maxLength | The maximum length of the text input's content. |
String | initValue | The initial value to be displayed by this input. |
Properties
| Improve this Doc View SourceComponentType
Gets the type of the component.
Declaration
public override ComponentType ComponentType { get; }
Property Value
Type | Description |
---|---|
ComponentType |
Overrides
| Improve this Doc View SourceInitialValue
Gets the initial value to be displayed by this input.
Declaration
public string InitialValue { get; }
Property Value
Type | Description |
---|---|
String |
MaxLength
Gets the maximum length of the text input.
Declaration
public int MaxLength { get; }
Property Value
Type | Description |
---|---|
Int32 |
MinLength
Gets the minimum length of the text input.
Declaration
public int MinLength { get; }
Property Value
Type | Description |
---|---|
Int32 |
Placeholder
Gets the placeholder of the text input.
Declaration
public string Placeholder { get; }
Property Value
Type | Description |
---|---|
String |
Style
Gets the style of the text input.
Declaration
public TextInputStyle Style { get; }
Property Value
Type | Description |
---|---|
TextInputStyle |