Interface ButtonInteraction
-
- All Superinterfaces:
ComponentInteraction,IDeferrableCallback,IMessageEditCallback,Interaction,IReplyCallback,ISnowflake
- All Known Implementing Classes:
ButtonInteractionEvent
public interface ButtonInteraction extends ComponentInteraction
Interaction on aButtoncomponent.- See Also:
ButtonInteractionEvent
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default RestAction<Void>editButton(Button newButton)Update the button with a new button instance.ButtongetButton()TheButtonthis interaction belongs to.default ButtongetComponent()TheActionComponentinstance.-
Methods inherited from interface net.dv8tion.jda.api.interactions.components.ComponentInteraction
getChannel, getComponentId, getComponentType, getMessage, getMessageId, getMessageIdLong
-
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 Detail
-
getComponent
@Nonnull default Button getComponent()
Description copied from interface:ComponentInteractionTheActionComponentinstance.- Specified by:
getComponentin interfaceComponentInteraction- Returns:
- The
ActionComponent
-
getButton
@Nonnull Button getButton()
TheButtonthis interaction belongs to.- Returns:
- The
Button - See Also:
ComponentInteraction.getComponentId()
-
editButton
@Nonnull @CheckReturnValue default RestAction<Void> editButton(@Nullable Button newButton)
Update the button with a new button instance.If this interaction is already acknowledged this will use
IDeferrableCallback.getHook()and otherwiseIMessageEditCallback.editComponents(Collection)directly to acknowledge the interaction.- Parameters:
newButton- The new button to use, or null to remove this button from the message entirely- Returns:
RestAction
-
-