Class ModalReplyableEvent<T extends 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:
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:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidreplyModal(Class<?> origin, String modal, Collection<ModalTopLevelComponent> components, Entry... placeholders) Acknowledgement of this event with aModal.voidreplyModal(Class<?> origin, String modal, ModalTopLevelComponent component, Entry... placeholders) Acknowledgement of this event with aModal.voidreplyModal(String modal, Collection<ModalTopLevelComponent> components, Entry... placeholders) Acknowledgement of this event with aModal.voidreplyModal(String modal, ModalTopLevelComponent component, Entry... placeholders) 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, messageResolver, resolve, resolve, runtimeIdMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Interaction
getChannelId, getChannelType, getGuildChannel, getGuildLocale, getMessageChannel, getType, isFromAttachedGuild, isFromGuildMethods inherited from interface 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 withcomponent- theModalTopLevelComponentto add to this modalplaceholders- theEntryplaceholders to use for message resolution- Throws:
IllegalArgumentException- if noModalwith the given name was found
-
replyModal
public void replyModal(Class<?> origin, String modal, ModalTopLevelComponent component, Entry... placeholders) Acknowledgement of this event with aModal. This will open a popup on the target users Discord client.- Parameters:
origin- theClassthe modal handler is defined inmodal- the method name of theModalyou want to reply withcomponent- theModalTopLevelComponentto add to this modalplaceholders- theEntryplaceholders to use for message resolution- Throws:
IllegalArgumentException- if noModalwith the given name was found
-
replyModal
public void replyModal(String modal, Collection<ModalTopLevelComponent> components, Entry... placeholders) 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 withcomponents- aCollectionofModalTopLevelComponents to add to this modalplaceholders- theEntryplaceholders to use for message resolution- Throws:
IllegalArgumentException- if noModalwith the given name was found
-
replyModal
public void replyModal(Class<?> origin, String modal, Collection<ModalTopLevelComponent> components, Entry... placeholders) Acknowledgement of this event with aModal. This will open a popup on the target users Discord client.- Parameters:
origin- theClassthe modal handler is defined inmodal- the method name of theModalyou want to reply withcomponents- aCollectionofModalTopLevelComponents to add to this modalplaceholders- theEntryplaceholders to use for message resolution- Throws:
IllegalArgumentException- if noModalwith the given name was found
-