Class GenericContextInteractionEvent<T>
- java.lang.Object
-
- net.dv8tion.jda.api.events.Event
-
- net.dv8tion.jda.api.events.interaction.GenericInteractionCreateEvent
-
- net.dv8tion.jda.api.events.interaction.command.GenericCommandInteractionEvent
-
- net.dv8tion.jda.api.events.interaction.command.GenericContextInteractionEvent<T>
-
- All Implemented Interfaces:
ISnowflake,GenericEvent,IDeferrableCallback,IReplyCallback,CommandInteraction,CommandInteractionPayload,ContextInteraction<T>,Interaction
- Direct Known Subclasses:
MessageContextInteractionEvent,UserContextInteractionEvent
public class GenericContextInteractionEvent<T> extends GenericCommandInteractionEvent implements ContextInteraction<T>
Indicates that aContextInteractionwas used.Requirements
To receive these events, you must unset the Interactions Endpoint URL in your application dashboard. You can simply remove the URL for this endpoint in your settings at the Discord Developers Portal.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.dv8tion.jda.api.interactions.commands.context.ContextInteraction
ContextInteraction.ContextTarget
-
-
Constructor Summary
Constructors Constructor Description GenericContextInteractionEvent(JDA api, long responseNumber, ContextInteraction<T> interaction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ContextInteraction<T>getInteraction()TheInteractioninstance.TgetTarget()The target entity of this context interactionContextInteraction.ContextTargetgetTargetType()The target type of this context interaction-
Methods inherited from class net.dv8tion.jda.api.events.interaction.command.GenericCommandInteractionEvent
deferReply, getCommandIdLong, getCommandType, getHook, getName, getOptions, getSubcommandGroup, getSubcommandName
-
Methods inherited from class net.dv8tion.jda.api.events.interaction.GenericInteractionCreateEvent
getChannel, getGuild, getGuildLocale, getIdLong, getMember, getToken, getTypeRaw, getUser, getUserLocale, isAcknowledged
-
Methods inherited from class net.dv8tion.jda.api.events.Event
getJDA, getResponseNumber
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.dv8tion.jda.api.interactions.commands.CommandInteractionPayload
getCommandId, getCommandIdLong, getCommandPath, getCommandString, getCommandType, getName, getOption, getOption, getOption, getOption, getOptions, getOptionsByName, getOptionsByType, getSubcommandGroup, getSubcommandName
-
Methods inherited from interface net.dv8tion.jda.api.interactions.callbacks.IDeferrableCallback
getHook
-
Methods inherited from interface net.dv8tion.jda.api.interactions.Interaction
getChannel, getChannelType, getGuild, getGuildChannel, getGuildLocale, getJDA, getMember, getMessageChannel, getNewsChannel, getPrivateChannel, getTextChannel, getThreadChannel, getToken, getType, getTypeRaw, getUser, getUserLocale, getVoiceChannel, isAcknowledged, isFromGuild
-
Methods inherited from interface net.dv8tion.jda.api.interactions.callbacks.IReplyCallback
deferReply, deferReply, reply, reply, replyEmbeds, replyEmbeds, replyFile, replyFile, replyFile, replyFile, replyFormat
-
Methods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
-
-
-
-
Constructor Detail
-
GenericContextInteractionEvent
public GenericContextInteractionEvent(@Nonnull JDA api, long responseNumber, @Nonnull ContextInteraction<T> interaction)
-
-
Method Detail
-
getInteraction
@Nonnull public ContextInteraction<T> getInteraction()
Description copied from class:GenericInteractionCreateEventTheInteractioninstance.
Note that this event is a delegate which implements the same interface.- Overrides:
getInteractionin classGenericCommandInteractionEvent- Returns:
- The
Interaction
-
getTargetType
@Nonnull public ContextInteraction.ContextTarget getTargetType()
Description copied from interface:ContextInteractionThe target type of this context interaction- Specified by:
getTargetTypein interfaceContextInteraction<T>- Returns:
- The context target type
-
getTarget
@Nonnull public T getTarget()
Description copied from interface:ContextInteractionThe target entity of this context interaction- Specified by:
getTargetin interfaceContextInteraction<T>- Returns:
- The target entity
-
-