MessageTextInputBuilder¶
Inherits: MessageComponentBuilder < Reference < Object
Description¶
Helper class to build message text inputs (only availabe to Modals).
Methods¶
return type | signature |
---|---|
MessageTextInputBuilder | with_value ( String value ) |
MessageTextInputBuilder | with_placeholder ( String placeholder ) |
MessageTextInputBuilder | min_values ( int min_values ) |
MessageTextInputBuilder | max_values ( int max_values ) |
MessageTextInputBuilder | required ( bool value ) |
Constants¶
-
int LABEL_MAX_LENGTH = 45
Maximum number of characters in a text input label.
-
int PLACEHOLDER_MAX_LENGTH = 100
Maximum number of characters in a text input placeholder.
-
int MAX_VALUES = 4000
Default maximum input length.
-
int MIN_VALUES = 0
Default minimum input length.
-
int INPUT_MAX_LENGTH = 4000
Default maximum input length.
Method Descriptions¶
-
MessageTextInputBuilder MessageTextInputBuilder ( String custom_id, String label )
Constructs a new
MessageTextInputBuilder
instance with acustom_id
andlabel
text.
-
MessageTextInputBuilder with_value ( String value )
Pre-fills an input value.
-
MessageTextInputBuilder with_placeholder ( String placeholder )
Sets a placeholder text to show if the input is empty.
-
MessageTextInputBuilder min_values ( int min_values )
Sets the minimum input length.
-
MessageTextInputBuilder max_values ( int max_values )
Sets the maximum input length.
-
MessageTextInputBuilder required ( bool value )
Requires the text input to be filled,
true
by default.