Package org.javacord.api.interaction
Interface ModalInteraction
-
- All Superinterfaces:
DiscordEntity,InteractionBase
public interface ModalInteraction extends InteractionBase
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<HighLevelComponent>getComponents()Get the components of the modal.java.lang.StringgetCustomId()Get the custom id of the select menu.java.util.Optional<java.lang.String>getTextInputValueByCustomId(java.lang.String customId)Get the value of a text input by its custom id.java.util.List<java.lang.String>getTextInputValues()Gets the values of each text input.-
Methods inherited from interface org.javacord.api.entity.DiscordEntity
getApi, getCreationTimestamp, getId, getIdAsString
-
Methods inherited from interface org.javacord.api.interaction.InteractionBase
createFollowupMessageBuilder, createImmediateResponder, getApplicationId, getBotPermissions, getChannel, getLocale, getServer, getServerLocale, getToken, getType, getUser, getVersion, respondLater, respondLater, respondWithModal, respondWithModal
-
-
-
-
Method Detail
-
getCustomId
java.lang.String getCustomId()
Get the custom id of the select menu.- Returns:
- The custom ID.
-
getComponents
java.util.List<HighLevelComponent> getComponents()
Get the components of the modal.- Returns:
- The components.
-
getTextInputValues
java.util.List<java.lang.String> getTextInputValues()
Gets the values of each text input. This is a shorthand method to avoid iterating the nested components by yourself.- Returns:
- The values of the text input components.
-
getTextInputValueByCustomId
java.util.Optional<java.lang.String> getTextInputValueByCustomId(java.lang.String customId)
Get the value of a text input by its custom id. This is a shorthand method to avoid iterating the nested components by yourself.- Parameters:
customId- The custom ID of the component.- Returns:
- The value of the text input component with the id.
-
-