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:
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:
-
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, removeComponents, 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 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 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
-