Class ModalReplyableEvent<T extends GenericInteractionCreateEvent>
java.lang.Object
com.github.kaktushose.jda.commands.dispatching.events.Event<T>
com.github.kaktushose.jda.commands.dispatching.events.ReplyableEvent<T>
com.github.kaktushose.jda.commands.dispatching.events.ModalReplyableEvent<T>
- Type Parameters:
T
- the type ofGenericInteractionCreateEvent
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:
-
Field Summary
Fields inherited from class com.github.kaktushose.jda.commands.dispatching.events.ReplyableEvent
definition
-
Constructor Summary
ModifierConstructorDescriptionprotected
ModalReplyableEvent
(T event, @NotNull InteractionRegistry registry, @NotNull com.github.kaktushose.jda.commands.dispatching.Runtime runtime, @NotNull InteractionDefinition definition, InteractionDefinition.ReplyConfig global) Constructs a new ModalReplyableEvent. -
Method Summary
Modifier and TypeMethodDescriptionvoid
replyModal
(@NotNull String modal) Acknowledgement of this event with aModal
.Methods inherited from class com.github.kaktushose.jda.commands.dispatching.events.ReplyableEvent
getButton, getSelectMenu, removeComponents, reply, reply, reply, with
Methods inherited from class com.github.kaktushose.jda.commands.dispatching.events.Event
closeRuntime, getChannel, getChannelIdLong, getEntitlements, getGuild, getIdLong, getJDA, getMember, getToken, getTypeRaw, getUser, getUserLocale, isAcknowledged, jdaEvent, kv, runtimeId
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.dv8tion.jda.api.interactions.Interaction
getChannelId, getChannelType, getGuildChannel, getGuildLocale, getMessageChannel, getType, isFromGuild
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getTimeCreated
-
Constructor Details
-
ModalReplyableEvent
protected ModalReplyableEvent(@NotNull T event, @NotNull @NotNull InteractionRegistry registry, @NotNull @NotNull com.github.kaktushose.jda.commands.dispatching.Runtime runtime, @NotNull @NotNull InteractionDefinition definition, @NotNull InteractionDefinition.ReplyConfig global) Constructs a new ModalReplyableEvent.- Parameters:
event
- the subtypeModalReplyableEvent
ofGenericInteractionCreateEvent
registry
- the correspondingInteractionRegistry
runtime
- theRuntime
this event lives indefinition
- theInteractionDefinition
this event belongs to
-
-
Method Details
-
replyModal
Acknowledgement of this event with aModal
. This will open a popup on the target user's Discord client.- Parameters:
modal
- the method name of theModal
you want to reply with- Throws:
IllegalArgumentException
- if noModal
with the given name was found
-