Class ModalReplyableEvent<T extends net.dv8tion.jda.api.events.interaction.GenericInteractionCreateEvent>

Type Parameters:
T - the type of GenericInteractionCreateEvent this event represents
All Implemented Interfaces:
net.dv8tion.jda.api.entities.ISnowflake, net.dv8tion.jda.api.interactions.Interaction
Direct Known Subclasses:
CommandEvent, ComponentEvent

public abstract sealed class ModalReplyableEvent<T extends net.dv8tion.jda.api.events.interaction.GenericInteractionCreateEvent> extends ReplyableEvent<T> permits CommandEvent, ComponentEvent
Subtype of ReplyableEvent that also supports replying with a Modal.
See Also:
  • Constructor Details

    • ModalReplyableEvent

      public ModalReplyableEvent()
  • Method Details

    • replyModal

      public void replyModal(String modal, net.dv8tion.jda.api.components.ModalTopLevelComponent component, Entry... placeholders)
      Acknowledgement of this event with a Modal. This will open a popup on the target users Discord client.
      Parameters:
      modal - the method name of the Modal you want to reply with
      component - the ModalTopLevelComponent to add to this modal
      placeholders - the Entry placeholders to use for message resolution
      Throws:
      IllegalArgumentException - if no Modal with the given name was found
    • replyModal

      public void replyModal(Class<?> origin, String modal, net.dv8tion.jda.api.components.ModalTopLevelComponent component, Entry... placeholders)
      Acknowledgement of this event with a Modal. This will open a popup on the target users Discord client.
      Parameters:
      origin - the Class the modal handler is defined in
      modal - the method name of the Modal you want to reply with
      component - the ModalTopLevelComponent to add to this modal
      placeholders - the Entry placeholders to use for message resolution
      Throws:
      IllegalArgumentException - if no Modal with the given name was found
    • replyModal

      public void replyModal(String modal, Collection<net.dv8tion.jda.api.components.ModalTopLevelComponent> components, Entry... placeholders)
      Acknowledgement of this event with a Modal. This will open a popup on the target users Discord client.
      Parameters:
      modal - the method name of the Modal you want to reply with
      components - a Collection of ModalTopLevelComponents to add to this modal
      placeholders - the Entry placeholders to use for message resolution
      Throws:
      IllegalArgumentException - if no Modal with the given name was found
    • replyModal

      public void replyModal(Class<?> origin, String modal, Collection<net.dv8tion.jda.api.components.ModalTopLevelComponent> components, Entry... placeholders)
      Acknowledgement of this event with a Modal. This will open a popup on the target users Discord client.
      Parameters:
      origin - the Class the modal handler is defined in
      modal - the method name of the Modal you want to reply with
      components - a Collection of ModalTopLevelComponents to add to this modal
      placeholders - the Entry placeholders to use for message resolution
      Throws:
      IllegalArgumentException - if no Modal with the given name was found