Class ModalEvent

java.lang.Object
io.github.kaktushose.jdac.dispatching.events.Event<net.dv8tion.jda.api.events.interaction.ModalInteractionEvent>
io.github.kaktushose.jdac.dispatching.events.ReplyableEvent<net.dv8tion.jda.api.events.interaction.ModalInteractionEvent>
io.github.kaktushose.jdac.dispatching.events.interactions.ModalEvent
All Implemented Interfaces:
net.dv8tion.jda.api.entities.ISnowflake, net.dv8tion.jda.api.interactions.Interaction

public final class ModalEvent extends ReplyableEvent<net.dv8tion.jda.api.events.interaction.ModalInteractionEvent>
This class is a subclass of Event. It provides additional features for replying to a ModalInteractionEvent.
See Also:
  • Constructor Details

    • ModalEvent

      public ModalEvent()
  • Method Details

    • deferReply

      public void deferReply(boolean ephemeral)
      Description copied from class: ReplyableEvent

      Acknowledge this interaction and defer the reply to a later time.

      This will send a <Bot> is thinking... message in chat that will be updated later. This will use the passed boolean to set the ephemeral flag. If your initial deferred message is ephemeral it cannot be made non-ephemeral later. Use ReplyableEvent.deferReply() to use the InteractionDefinition.ReplyConfig for the ephemeral flag.

      You only have 3 seconds to acknowledge an interaction!

      When the acknowledgement is sent after the interaction expired, you will receive ErrorResponse.UNKNOWN_INTERACTION.

      Use ReplyableEvent.reply(String, Entry...) to reply directly.

      Specified by:
      deferReply in class ReplyableEvent<net.dv8tion.jda.api.events.interaction.ModalInteractionEvent>
      Parameters:
      ephemeral - yes
    • deferEdit

      public void deferEdit()

      No-op acknowledgement of this interaction.

      This tells discord you intend to update the message that the triggering component is a part of instead of sending a reply message. You are not required to actually update the message, this will simply acknowledge that you accepted the interaction.

      You only have 3 seconds to acknowledge an interaction!

      When the acknowledgement is sent after the interaction expired, you will receive ErrorResponse.UNKNOWN_INTERACTION.

      Use ReplyableEvent.reply(String, Entry...) to edit it directly.