Annotation Interface Modal
Methods annotated with Modal will be registered as a modal at startup.
Therefore, the method must be declared inside a class that is annotated with Interaction.
You only define the title via this annotation. The rest of the modal is built when calling
ModalReplyableEvent.replyModal(String, ModalTopLevelComponent, Entry...).
Example:
@Modal("My Modal")
public void onModal(ModalEvent event) { ... }
@Command("/example")
public void onCommand(CommandEvent event) {
event.replyModal("onModal", TextDisplay.of("Hello World"));
}
- See Also:
-
Required Element Summary
Required Elements
-
Element Details
-
value
-