Annotation Interface ModalHandler
Marks a method as a modal submission handler.
Example:
@ModalHandler("feedback")
public void handleFeedback(ModalInteractionEvent event) {
String feedback = event.getValue("feedback-input").getAsString();
event.reply("Thanks for your feedback!").setEphemeral(true).queue();
}
The value is the modal ID prefix.
-
Required Element Summary
Required Elements
-
Element Details
-
value
String value- Returns:
- the modal ID prefix used to identify and route modal submissions to this handler
-