Class ModalMapping
java.lang.Object
net.dv8tion.jda.api.interactions.modals.ModalMapping
ID/Value pair for a
ModalInteractionEvent
.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
The String representation of this component.The String list representation of this component.The custom id of the component owning this datagetId()
Deprecated.getType()
TheType
of this componentint
The unique, numeric id of the component owning this dataint
hashCode()
toString()
-
Constructor Details
-
ModalMapping
-
-
Method Details
-
getId
Deprecated.Replaced withgetCustomId()
The custom id of this component- Returns:
- The custom id of this component
-
getCustomId
The custom id of the component owning this data- Returns:
- The custom id of the component
-
getUniqueId
public int getUniqueId()The unique, numeric id of the component owning this data- Returns:
- The numeric id of the component
-
getType
TheType
of this component- Returns:
- Type of this component
-
getAsString
The String representation of this component.For
TextInputs
, this returns what the User typed in it.Use
getType()
to check if this method can be used safely!- Returns:
- The String representation of this component.
- Throws:
IllegalStateException
- If this ModalMapping cannot be represented as a String.
-
getAsStringList
The String list representation of this component.For
StringSelectMenus
, this returns the values chosen by the User.Use
getType()
to check if this method can be used safely!- Returns:
- The string list representation of this component.
- Throws:
IllegalStateException
- If this ModalMapping cannot be represented as a List of Strings.
-
toString
-
equals
-
hashCode
public int hashCode()
-
getCustomId()