Interface IModalCallback

All Superinterfaces:
Interaction, ISnowflake
All Known Subinterfaces:
ButtonInteraction, CommandInteraction, ComponentInteraction, ContextInteraction<T>, EntitySelectInteraction, MessageContextInteraction, SelectMenuInteraction<T,S>, SlashCommandInteraction, StringSelectInteraction, UserContextInteraction
All Known Implementing Classes:
ButtonInteractionEvent, EntitySelectInteractionEvent, GenericCommandInteractionEvent, GenericComponentInteractionCreateEvent, GenericContextInteractionEvent, GenericSelectMenuInteractionEvent, MessageContextInteractionEvent, SlashCommandInteractionEvent, StringSelectInteractionEvent, UserContextInteractionEvent

public interface IModalCallback extends Interaction
Interactions which allow sending modals as a response.

Sending a modal using replyModal(Modal) will automatically acknowledge this interaction.

  • Method Details

    • replyModal

      @Nonnull @CheckReturnValue ModalCallbackAction replyModal(@Nonnull Modal modal)
      Acknowledgement of this interaction with a Modal.

      This will open a popup on the target user's Discord client.

      Interactions can only be acknowledged once.

      You only have 3 seconds to acknowledge an interaction!
      When the acknowledgement is sent after the interaction expired, you will receive ErrorResponse.UNKNOWN_INTERACTION.

      Parameters:
      modal - The Modal to send
      Returns:
      ModalCallbackAction
      Throws:
      IllegalArgumentException - If the provided modal is null