Class ModalReplyableEvent<T extends GenericInteractionCreateEvent>

Type Parameters:
T - the type of GenericInteractionCreateEvent this event represents
All Implemented Interfaces:
Reply, ISnowflake, Interaction
Direct Known Subclasses:
CommandEvent, ComponentEvent

public abstract sealed class ModalReplyableEvent<T extends 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, Entry... placeholder)
      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
      placeholder - the Entry placeholders to use for localization
      Throws:
      IllegalArgumentException - if no Modal with the given name was found
    • replyModal

      public void replyModal(String modal, Function<ModalBuilder, ModalBuilder> callback)
      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
      callback - a Function to dynamically modify the Modal before replying with it
      Throws:
      IllegalArgumentException - if no Modal with the given name was found