Interface MessageContextInteraction
-
- All Superinterfaces:
CommandInteraction
,CommandInteractionPayload
,ContextInteraction<Message>
,IDeferrableCallback
,Interaction
,IReplyCallback
,ISnowflake
- All Known Implementing Classes:
MessageContextInteractionEvent
public interface MessageContextInteraction extends ContextInteraction<Message>
Interaction with a message context menu command
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.dv8tion.jda.api.interactions.commands.context.ContextInteraction
ContextInteraction.ContextTarget
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description MessageChannel
getChannel()
The channel this interaction happened in.default GuildMessageChannel
getGuildChannel()
TheGuildChannel
this interaction happened in.default ContextInteraction.ContextTarget
getTargetType()
The target type of this context interaction-
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
-
-
-
-
Method Detail
-
getTargetType
@Nonnull default ContextInteraction.ContextTarget getTargetType()
Description copied from interface:ContextInteraction
The target type of this context interaction- Specified by:
getTargetType
in interfaceContextInteraction<Message>
- Returns:
- The context target type
-
getChannel
@Nullable MessageChannel getChannel()
Description copied from interface:Interaction
The channel this interaction happened in.
This is currently never null, but might be nullable in the future.- Specified by:
getChannel
in interfaceInteraction
- Returns:
- The channel or null if this interaction is not from a channel context
-
getGuildChannel
@Nonnull default GuildMessageChannel getGuildChannel()
Description copied from interface:Interaction
TheGuildChannel
this interaction happened in.
IfInteraction.getChannelType()
is not a guild type, this throwsIllegalStateException
!- Specified by:
getGuildChannel
in interfaceInteraction
- Returns:
- The
GuildChannel
-
-