Interface TextInput
-
- All Superinterfaces:
Component,LowLevelComponent,Specializable<LowLevelComponent>
public interface TextInput extends LowLevelComponent
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static TextInputcreate(TextInputStyle style, java.lang.String customId, java.lang.String label)Creates a new text input with the given values.static TextInputcreate(TextInputStyle style, java.lang.String customId, java.lang.String label, boolean required)Creates a new text input with the given values.static TextInputcreate(TextInputStyle style, java.lang.String customId, java.lang.String label, java.lang.Integer minimumLength, java.lang.Integer maximumLength)Creates a new text input with the given values.static TextInputcreate(TextInputStyle style, java.lang.String customId, java.lang.String label, java.lang.Integer minimumLength, java.lang.Integer maximumLength, boolean required)Creates a new text input with the given values.static TextInputcreate(TextInputStyle style, java.lang.String customId, java.lang.String label, java.lang.String placeholder, java.lang.String value)Creates a new text input with the given values.static TextInputcreate(TextInputStyle style, java.lang.String customId, java.lang.String label, java.lang.String placeholder, java.lang.String value, boolean required)Creates a new text input with the given values.java.lang.StringgetCustomId()Get the text input's identifier.java.util.Optional<java.lang.String>getLabel()Get the text input's label.java.util.Optional<java.lang.Integer>getMaximumLength()Get the text input's label.java.util.Optional<java.lang.Integer>getMinimumLength()Get the text input's label.java.util.Optional<java.lang.String>getPlaceholder()Get the text input's label.java.util.Optional<TextInputStyle>getStyle()Get the text input's style.java.lang.StringgetValue()Get the text input's label.booleanisRequired()Get whether the text input is disabled.-
Methods inherited from interface org.javacord.api.entity.message.component.LowLevelComponent
asButton, asSelectMenu, asTextInput, isButton, isSelectMenu, isTextInput
-
Methods inherited from interface org.javacord.api.util.Specializable
as
-
-
-
-
Method Detail
-
getStyle
java.util.Optional<TextInputStyle> getStyle()
Get the text input's style.- Returns:
- The text input's style.
-
getCustomId
java.lang.String getCustomId()
Get the text input's identifier.- Returns:
- The text input's custom identifier.
-
getLabel
java.util.Optional<java.lang.String> getLabel()
Get the text input's label.- Returns:
- The text input's label.
-
getMinimumLength
java.util.Optional<java.lang.Integer> getMinimumLength()
Get the text input's label.- Returns:
- The text input's label.
-
getMaximumLength
java.util.Optional<java.lang.Integer> getMaximumLength()
Get the text input's label.- Returns:
- The text input's label.
-
isRequired
boolean isRequired()
Get whether the text input is disabled.- Returns:
- Whether the text input is disabled.
-
getValue
java.lang.String getValue()
Get the text input's label.- Returns:
- The text input's label.
-
getPlaceholder
java.util.Optional<java.lang.String> getPlaceholder()
Get the text input's label.- Returns:
- The text input's label.
-
create
static TextInput create(TextInputStyle style, java.lang.String customId, java.lang.String label)
Creates a new text input with the given values.- Parameters:
style- The style of the text inputcustomId- The custom ID for the text input.label- The label of the text Input- Returns:
- The created text input.
-
create
static TextInput create(TextInputStyle style, java.lang.String customId, java.lang.String label, boolean required)
Creates a new text input with the given values.- Parameters:
style- The style of the text inputcustomId- The custom ID for the text input.label- The label of the text inputrequired- Whether this text input is required.- Returns:
- The created text input.
-
create
static TextInput create(TextInputStyle style, java.lang.String customId, java.lang.String label, java.lang.Integer minimumLength, java.lang.Integer maximumLength)
Creates a new text input with the given values.- Parameters:
style- The style of the text inputcustomId- The custom ID for the text input.label- The label of the text inputminimumLength- The minimum length of the text input string.maximumLength- The maximum length of the text input string.- Returns:
- The created text input.
-
create
static TextInput create(TextInputStyle style, java.lang.String customId, java.lang.String label, java.lang.Integer minimumLength, java.lang.Integer maximumLength, boolean required)
Creates a new text input with the given values.- Parameters:
style- The style of the text inputcustomId- The custom ID for the text input.label- The label of the text inputminimumLength- The minimum length of the text input string.maximumLength- The maximum length of the text input string.required- Whether this text input is required.- Returns:
- The created text input.
-
create
static TextInput create(TextInputStyle style, java.lang.String customId, java.lang.String label, java.lang.String placeholder, java.lang.String value)
Creates a new text input with the given values.- Parameters:
style- The style of the text inputcustomId- The custom ID for the text input.label- The label of the text inputplaceholder- The placeholder of the text input.value- The pre-defined value of the text input.- Returns:
- The created text input.
-
create
static TextInput create(TextInputStyle style, java.lang.String customId, java.lang.String label, java.lang.String placeholder, java.lang.String value, boolean required)
Creates a new text input with the given values.- Parameters:
style- The style of the text inputcustomId- The custom ID for the text input.label- The label of the text inputplaceholder- The placeholder of the text input.value- The pre-defined value of the text input.required- Whether this text input is required.- Returns:
- The created text input.
-
-