Interface ComponentInteraction
- All Superinterfaces:
IDeferrableCallback
,IMessageEditCallback
,Interaction
,IReplyCallback
,ISnowflake
- All Known Subinterfaces:
ButtonInteraction
,SelectMenuInteraction
- All Known Implementing Classes:
ButtonInteractionEvent
,GenericComponentInteractionCreateEvent
,SelectMenuInteractionEvent
Interaction on a message
ActionComponent
.
Instead of IReplyCallback.deferReply()
and IReplyCallback.reply(String)
you can use IMessageEditCallback.deferEdit()
and IMessageEditCallback.editMessage(String)
with these interactions!
You can only acknowledge an interaction once!
-
Method Summary
Modifier and TypeMethodDescriptionThe respectiveMessageChannel
for this interaction.TheActionComponent
instance.The custom component ID provided to the component when it was originally created.TheComponent.Type
TheMessage
instance.default String
The id of the message.long
The id of the message.Methods inherited from interface net.dv8tion.jda.api.interactions.callbacks.IDeferrableCallback
getHook
Methods inherited from interface net.dv8tion.jda.api.interactions.callbacks.IMessageEditCallback
deferEdit, editComponents, editComponents, editMessage, editMessage, editMessageEmbeds, editMessageEmbeds, editMessageFormat
Methods inherited from interface net.dv8tion.jda.api.interactions.Interaction
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
-
Method Details
-
getComponentId
The custom component ID provided to the component when it was originally created.
This value should be used to determine what action to take in regard to this interaction.
This id does not have to be numerical.- Returns:
- The component ID
- See Also:
-
getComponent
TheActionComponent
instance.- Returns:
- The
ActionComponent
-
getMessage
TheMessage
instance.- Returns:
- The
Message
-
getMessageIdLong
long getMessageIdLong()The id of the message.- Returns:
- The message id
-
getMessageId
The id of the message.- Returns:
- The message id
-
getComponentType
TheComponent.Type
- Returns:
- The
Component.Type
-
getChannel
The respectiveMessageChannel
for this interaction.- Specified by:
getChannel
in interfaceInteraction
- Returns:
- The
MessageChannel
-