Search Results for

    Show / Hide Table of Contents

    Class ModalTextInputAttribute

    Marks a IModal property as a text input.

    Inheritance
    Object
    ModalInputAttribute
    ModalTextInputAttribute
    Inherited Members
    ModalInputAttribute.CustomId
    Namespace: Discord.Interactions
    Assembly: Discord.Net.Interactions.dll
    Syntax
    public sealed class ModalTextInputAttribute : ModalInputAttribute

    Constructors

    | Improve this Doc View Source

    ModalTextInputAttribute(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 Source

    ComponentType

    Gets the type of the component.

    Declaration
    public override ComponentType ComponentType { get; }
    Property Value
    Type Description
    ComponentType
    Overrides
    ModalInputAttribute.ComponentType
    | Improve this Doc View Source

    InitialValue

    Gets the initial value to be displayed by this input.

    Declaration
    public string InitialValue { get; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    MaxLength

    Gets the maximum length of the text input.

    Declaration
    public int MaxLength { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    MinLength

    Gets the minimum length of the text input.

    Declaration
    public int MinLength { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc View Source

    Placeholder

    Gets the placeholder of the text input.

    Declaration
    public string Placeholder { get; }
    Property Value
    Type Description
    String
    | Improve this Doc View Source

    Style

    Gets the style of the text input.

    Declaration
    public TextInputStyle Style { get; }
    Property Value
    Type Description
    TextInputStyle

    Theme

    • Improve this Doc
    • View Source
    In This Article
    Back to top Discord.Net (c) 2015-2023 3.12.0