Class ModalEvent
- All Implemented Interfaces:
net.dv8tion.jda.api.entities.ISnowflake, net.dv8tion.jda.api.interactions.Interaction
Event. It provides additional features for replying to a ModalInteractionEvent.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidNo-op acknowledgement of this interaction.voiddeferReply(boolean ephemeral) Acknowledge this interaction and defer the reply to a later time.Methods inherited from class ReplyableEvent
deferReply, embed, findEmbed, getButton, getButton, getSelectMenu, getSelectMenu, reply, reply, reply, reply, withMethods inherited from class Event
closeRuntime, getChannel, getChannelIdLong, getContext, getEntitlements, getGuild, getIdLong, getIntegrationOwners, getJDA, getMember, getToken, getTypeRaw, getUser, getUserLocale, i18n, interactionInstance, isAcknowledged, jdaEvent, kv, localize, messageResolver, resolve, runtimeIdMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.dv8tion.jda.api.interactions.Interaction
getChannelId, getChannelType, getGuildChannel, getGuildLocale, getMessageChannel, getType, isFromAttachedGuild, isFromGuildMethods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getTimeCreated
-
Constructor Details
-
ModalEvent
public ModalEvent()
-
-
Method Details
-
deferReply
public void deferReply(boolean ephemeral) Description copied from class:ReplyableEventAcknowledge 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. UseReplyableEvent.deferReply()to use theInteractionDefinition.ReplyConfigfor 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:
deferReplyin classReplyableEvent<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.
-