Class ModalReplyableEvent<T extends net.dv8tion.jda.api.events.interaction.GenericInteractionCreateEvent>
java.lang.Object
io.github.kaktushose.jdac.dispatching.events.Event<T>
io.github.kaktushose.jdac.dispatching.events.ReplyableEvent<T>
io.github.kaktushose.jdac.dispatching.events.ModalReplyableEvent<T>
- Type Parameters:
T- the type ofGenericInteractionCreateEventthis event represents
- All Implemented Interfaces:
net.dv8tion.jda.api.entities.ISnowflake, net.dv8tion.jda.api.interactions.Interaction
- Direct Known Subclasses:
CommandEvent, ComponentEvent
public abstract sealed class ModalReplyableEvent<T extends net.dv8tion.jda.api.events.interaction.GenericInteractionCreateEvent>
extends ReplyableEvent<T>
permits CommandEvent, ComponentEvent
Subtype of
ReplyableEvent that also supports replying with a Modal.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidreplyModal(String modal, Entry... placeholder) Acknowledgement of this event with aModal.voidreplyModal(String modal, Function<ModalBuilder, ModalBuilder> callback) Acknowledgement of this event with aModal.Methods inherited from class ReplyableEvent
deferReply, deferReply, embed, findEmbed, getButton, getButton, getSelectMenu, getSelectMenu, reply, reply, reply, reply, reply, withMethods inherited from class Event
closeRuntime, getChannel, getChannelIdLong, getContext, getEntitlements, getGuild, getIdLong, getIntegrationOwners, getJDA, getMember, getToken, getTypeRaw, getUser, getUserLocale, interactionInstance, introspection, 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
-
ModalReplyableEvent
public ModalReplyableEvent()
-
-
Method Details
-
replyModal
Acknowledgement of this event with aModal. This will open a popup on the target users Discord client.- Parameters:
modal- the method name of theModalyou want to reply withplaceholder- theEntryplaceholders to use for localization- Throws:
IllegalArgumentException- if noModalwith the given name was found
-
replyModal
Acknowledgement of this event with aModal. This will open a popup on the target users Discord client.- Parameters:
modal- the method name of theModalyou want to reply withcallback- aFunctionto dynamically modify theModalbefore replying with it- Throws:
IllegalArgumentException- if noModalwith the given name was found
-