Class CommandEvent
java.lang.Object
com.github.kaktushose.jda.commands.dispatching.events.Event<GenericCommandInteractionEvent>
com.github.kaktushose.jda.commands.dispatching.events.ReplyableEvent<GenericCommandInteractionEvent>
com.github.kaktushose.jda.commands.dispatching.events.ModalReplyableEvent<GenericCommandInteractionEvent>
com.github.kaktushose.jda.commands.dispatching.events.interactions.CommandEvent
- All Implemented Interfaces:
Reply
,ISnowflake
,Interaction
This class is a subclass of
Event
. It provides additional features for replying to a GenericCommandInteractionEvent
.- See Also:
-
Field Summary
Fields inherited from class com.github.kaktushose.jda.commands.dispatching.events.ReplyableEvent
definition
-
Constructor Summary
ConstructorDescriptionCommandEvent
(@NotNull GenericCommandInteractionEvent event, @NotNull InteractionRegistry registry, @NotNull com.github.kaktushose.jda.commands.dispatching.Runtime runtime, @NotNull InteractionDefinition definition, InteractionDefinition.ReplyConfig global) Constructs a new CommandEvent. -
Method Summary
Modifier and TypeMethodDescription<T extends GenericCommandInteractionEvent>
TReturns the underlyingGenericCommandInteractionEvent
and casts it to the given type.Methods inherited from class com.github.kaktushose.jda.commands.dispatching.events.ModalReplyableEvent
replyModal
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
-
CommandEvent
public CommandEvent(@NotNull @NotNull GenericCommandInteractionEvent 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 CommandEvent.- Parameters:
event
- theGenericCommandInteractionEvent
this event holdsregistry
- the correspondingInteractionRegistry
runtime
- the correspondingRuntime
definition
- the correspondingInteractionDefinition
-
-
Method Details
-
jdaEvent
@NotNull public <T extends GenericCommandInteractionEvent> T jdaEvent(@NotNull @NotNull Class<T> type) Returns the underlyingGenericCommandInteractionEvent
and casts it to the given type.- Type Parameters:
T
- a subtype ofGenericCommandInteractionEvent
- Parameters:
type
- a subtype ofGenericCommandInteractionEvent
, likeSlashCommandInteractionEvent
- Returns:
CommandEvent
-