Class MessageContextInteractionEvent
- 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<Message>
-
- net.dv8tion.jda.api.events.interaction.command.MessageContextInteractionEvent
-
- All Implemented Interfaces:
ISnowflake,GenericEvent,IDeferrableCallback,IReplyCallback,CommandInteraction,CommandInteractionPayload,ContextInteraction<Message>,MessageContextInteraction,Interaction
public class MessageContextInteractionEvent extends GenericContextInteractionEvent<Message> implements MessageContextInteraction
Indicates that a message 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:
MessageContextInteraction,IReplyCallback
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.dv8tion.jda.api.interactions.commands.context.ContextInteraction
ContextInteraction.ContextTarget
-
-
Constructor Summary
Constructors Constructor Description MessageContextInteractionEvent(JDA api, long responseNumber, MessageContextInteraction interaction)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MessageChannelgetChannel()The channel this interaction happened in.MessageContextInteractiongetInteraction()TheInteractioninstance.-
Methods inherited from class net.dv8tion.jda.api.events.interaction.command.GenericContextInteractionEvent
getTarget, getTargetType
-
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
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.commands.context.ContextInteraction
getTarget
-
Methods inherited from interface net.dv8tion.jda.api.interactions.callbacks.IDeferrableCallback
getHook
-
Methods inherited from interface net.dv8tion.jda.api.interactions.Interaction
getChannelType, getGuild, 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
-
Methods inherited from interface net.dv8tion.jda.api.interactions.commands.context.MessageContextInteraction
getGuildChannel, getTargetType
-
-
-
-
Constructor Detail
-
MessageContextInteractionEvent
public MessageContextInteractionEvent(@Nonnull JDA api, long responseNumber, @Nonnull MessageContextInteraction interaction)
-
-
Method Detail
-
getInteraction
@Nonnull public MessageContextInteraction getInteraction()
Description copied from class:GenericInteractionCreateEventTheInteractioninstance.
Note that this event is a delegate which implements the same interface.- Overrides:
getInteractionin classGenericContextInteractionEvent<Message>- Returns:
- The
Interaction
-
getChannel
@Nullable public MessageChannel getChannel()
Description copied from interface:InteractionThe channel this interaction happened in.
This is currently never null, but might be nullable in the future.- Specified by:
getChannelin interfaceInteraction- Specified by:
getChannelin interfaceMessageContextInteraction- Overrides:
getChannelin classGenericInteractionCreateEvent- Returns:
- The channel or null if this interaction is not from a channel context
-
-