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 CompletableFuture<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.StringgetCustomId()Get the identifier of the clicked component.Optional<Message>getMessage()Gets the message that this interaction is related to.longgetMessageId()Gets the message ID that this interaction is related to.-
Methods inherited from interface org.javacord.api.entity.DiscordEntity
getApi, getCreationTimestamp, getCreationTimestamp, getId, getIdAsString
-
Methods inherited from interface org.javacord.api.interaction.InteractionBase
createFollowupMessageBuilder, createImmediateResponder, getApplicationId, getChannel, getServer, getToken, getType, getUser, getVersion, respondLater
-
-
-
-
Method Detail
-
getMessage
Optional<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.
-
getMessageId
long getMessageId()
Gets the message ID that this interaction is related to.- Returns:
- The message ID.
-
getCustomId
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
CompletableFuture<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
-
-