Interface IModalHandler


public interface IModalHandler
Represents a handler for a specific Discord Modal interaction. Implement this interface to define the behavior when a user submits a modal form.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    execute(net.dv8tion.jda.api.events.interaction.ModalInteractionEvent event)
    Executes the specific logic when the modal is submitted.
    @NotNull net.dv8tion.jda.api.modals.Modal
    Gets the Discord Modal component associated with this handler.
  • Method Details

    • getModal

      @NotNull @NotNull net.dv8tion.jda.api.modals.Modal getModal()
      Gets the Discord Modal component associated with this handler.
      Returns:
      The configured Modal instance.
    • execute

      void execute(net.dv8tion.jda.api.events.interaction.ModalInteractionEvent event)
      Executes the specific logic when the modal is submitted.
      Parameters:
      event - The ModalInteractionEvent triggered by the user.