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 respectiveMessageChannelfor this interaction.TheActionComponentinstance.The custom component ID provided to the component when it was originally created.TheComponent.TypeTheMessageinstance.default StringThe id of the message.longThe id of the message.Methods inherited from interface net.dv8tion.jda.api.interactions.callbacks.IDeferrableCallback
getHookMethods inherited from interface net.dv8tion.jda.api.interactions.callbacks.IMessageEditCallback
deferEdit, editComponents, editComponents, editMessage, editMessage, editMessageEmbeds, editMessageEmbeds, editMessageFormatMethods 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, isFromGuildMethods inherited from interface net.dv8tion.jda.api.interactions.callbacks.IReplyCallback
deferReply, deferReply, reply, reply, replyEmbeds, replyEmbeds, replyFile, replyFile, replyFile, replyFile, replyFormatMethods 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
TheActionComponentinstance.- Returns:
- The
ActionComponent
-
getMessage
TheMessageinstance.- 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 respectiveMessageChannelfor this interaction.- Specified by:
getChannelin interfaceInteraction- Returns:
- The
MessageChannel
-