Package org.javacord.api.interaction
Interface MessageComponentInteractionBase
-
- All Superinterfaces:
DiscordEntity,InteractionBase
- All Known Subinterfaces:
ButtonInteraction,MessageComponentInteraction,SelectMenuInteraction
public interface MessageComponentInteractionBase extends InteractionBase
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.concurrent.CompletableFuture<java.lang.Void>acknowledge()Acknowledges the incoming component interaction, for example a click on a button.ComponentInteractionOriginalMessageUpdatercreateOriginalMessageUpdater()Creates a message updater that can be used to update the message the component of this interaction is attached to.ComponentTypegetComponentType()Get the type of the component.java.lang.StringgetCustomId()Get the identifier of the clicked component.MessagegetMessage()Gets the message that this interaction is related to.-
Methods inherited from interface org.javacord.api.entity.DiscordEntity
getApi, getCreationTimestamp, getId, getIdAsString
-
Methods inherited from interface org.javacord.api.interaction.InteractionBase
createFollowupMessageBuilder, createImmediateResponder, getApplicationId, getChannel, getLocale, getServer, getServerLocale, getToken, getType, getUser, getVersion, respondLater, respondLater, respondWithModal, respondWithModal
-
-
-
-
Method Detail
-
getMessage
Message getMessage()
Gets the message that this interaction is related to. This may not be available if the sent message is EPHEMERAL.- Returns:
- The message.
-
getCustomId
java.lang.String getCustomId()
Get the identifier of the clicked component.- Returns:
- The component identifier.
-
getComponentType
ComponentType getComponentType()
Get the type of the component.- Returns:
- The component type.
-
acknowledge
java.util.concurrent.CompletableFuture<java.lang.Void> acknowledge()
Acknowledges the incoming component interaction, for example a click on a button. The user will not see a loading state. You can still send follow-up messages within a 15-minute timeframe.- Returns:
- A CompletableFuture that completes if the acknowledgement has been submitted successfully.
-
createOriginalMessageUpdater
ComponentInteractionOriginalMessageUpdater createOriginalMessageUpdater()
Creates a message updater that can be used to update the message the component of this interaction is attached to.- Returns:
- The new message updater
-
-