Annotation Interface TextInput


@Target(PARAMETER) @Retention(RUNTIME) public @interface TextInput
Annotation used to add TextInputs to Modals.
See Also:
  • Element Details

    • value

      String value
      The label shown above this text input box.
      Returns:
      Placeholder
    • placeholder

      String placeholder

      The placeholder of this TextInput.

      This is the short hint that describes the expected value of the TextInput field.

      Returns:
      Label for the input
      Default:
      ""
    • defaultValue

      String defaultValue

      The default value of this TextInput.

      This sets a pre-populated text for this TextInput field

      Returns:
      default value
      Default:
      ""
    • minValue

      int minValue
      The minimum length. This is -1 if none has been set.
      Returns:
      Minimum length or -1
      Default:
      -1
    • maxValue

      int maxValue
      The maximum length. This is -1 if none has been set.
      Returns:
      Maximum length or -1
      Default:
      -1
    • style

      The TextInputStyle. The default value is TextInputStyle.PARAGRAPH.
      Returns:
      The TextInputStyle
      Default:
      PARAGRAPH
    • required

      boolean required

      Whether this TextInput is required.

      If this is True, the user must populate this TextInput field before they can submit the Modal.

      Returns:
      True if this TextInput is required
      See Also:
      • invalid reference
        net.dv8tion.jda.api.interactions.components.text.TextInput#isRequired()
      Default:
      true