Class UserContextInteractionEvent
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<User>
net.dv8tion.jda.api.events.interaction.command.UserContextInteractionEvent
- All Implemented Interfaces:
ISnowflake, GenericEvent, IDeferrableCallback, IModalCallback, IReplyCallback, CommandInteraction, CommandInteractionPayload, ContextInteraction<User>, UserContextInteraction, Interaction
public class UserContextInteractionEvent
extends GenericContextInteractionEvent<User>
implements UserContextInteraction
Indicates that a user context command was 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.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface ContextInteraction
ContextInteraction.ContextTarget -
Constructor Summary
ConstructorsConstructorDescriptionUserContextInteractionEvent(JDA api, long responseNumber, UserContextInteraction interaction) -
Method Summary
Modifier and TypeMethodDescriptionTheInteractioninstance.If this context menu command was used in aGuild, this returns the member instance for the target user.Methods inherited from class GenericContextInteractionEvent
getTarget, getTargetTypeMethods inherited from class GenericCommandInteractionEvent
deferReply, getCommandIdLong, getCommandType, getHook, getName, getOptions, getSubcommandGroup, getSubcommandName, isGuildCommand, replyModalMethods inherited from class GenericInteractionCreateEvent
getChannel, getChannelIdLong, getContext, getEntitlements, getGuild, getGuildLocale, getIdLong, getIntegrationOwners, getMember, getToken, getTypeRaw, getUser, getUserLocale, isAcknowledgedMethods inherited from class Event
getJDA, getRawData, getResponseNumber, toStringMethods inherited from interface CommandInteractionPayload
getCommandId, getCommandIdLong, getCommandString, getCommandType, getFullCommandName, getName, getOption, getOption, getOption, getOption, getOptions, getOptionsByName, getOptionsByType, getSubcommandGroup, getSubcommandName, isGlobalCommand, isGuildCommandMethods inherited from interface ContextInteraction
getTargetMethods inherited from interface IDeferrableCallback
getHookMethods inherited from interface IModalCallback
replyModalMethods inherited from interface Interaction
getChannel, getChannelId, getChannelIdLong, getChannelType, getContext, getEntitlements, getGuild, getGuildChannel, getGuildLocale, getIntegrationOwners, getJDA, getMember, getMessageChannel, getToken, getType, getTypeRaw, getUser, getUserLocale, isAcknowledged, isFromAttachedGuild, isFromGuildMethods inherited from interface IReplyCallback
deferReply, deferReply, reply, reply, replyComponents, replyComponents, replyComponents, replyEmbeds, replyEmbeds, replyFiles, replyFiles, replyFormat, replyPollMethods inherited from interface ISnowflake
getId, getIdLong, getTimeCreatedMethods inherited from interface UserContextInteraction
getTargetType
-
Constructor Details
-
UserContextInteractionEvent
public UserContextInteractionEvent(@Nonnull JDA api, long responseNumber, @Nonnull UserContextInteraction interaction)
-
-
Method Details
-
getInteraction
Description copied from class:GenericInteractionCreateEventTheInteractioninstance.
Note that this event is a delegate which implements the same interface.- Overrides:
getInteractionin classGenericContextInteractionEvent<User>- Returns:
- The
Interaction
-
getTargetMember
Description copied from interface:UserContextInteractionIf this context menu command was used in aGuild, this returns the member instance for the target user.- Specified by:
getTargetMemberin interfaceUserContextInteraction- Returns:
- The target member instance, or null if this was not in a guild.
-