Class ButtonInteractionEvent
java.lang.Object
net.dv8tion.jda.api.events.Event
net.dv8tion.jda.api.events.interaction.GenericInteractionCreateEvent
net.dv8tion.jda.api.events.interaction.component.GenericComponentInteractionCreateEvent
net.dv8tion.jda.api.events.interaction.component.ButtonInteractionEvent
- All Implemented Interfaces:
ISnowflake,GenericEvent,IDeferrableCallback,IMessageEditCallback,IModalCallback,IPremiumRequiredReplyCallback,IReplyCallback,ButtonInteraction,ComponentInteraction,Interaction
public class ButtonInteractionEvent
extends GenericComponentInteractionCreateEvent
implements ButtonInteraction
Indicates that a custom
Button on one of the bots messages was clicked by a user.
This fires when a user clicks one of the custom buttons attached to a bot or webhook message.
Requirements
To receive these events, you must unset the Interactions Endpoint URL in your application dashboard.
You can simply remove the URL for this endpoint in your settings at the Discord Developers Portal.
-
Constructor Summary
ConstructorsConstructorDescriptionButtonInteractionEvent(JDA api, long responseNumber, ButtonInteraction interaction) -
Method Summary
Modifier and TypeMethodDescriptionTheButtonthis interaction belongs to.TheActionComponentinstance.TheInteractioninstance.Methods inherited from class net.dv8tion.jda.api.events.interaction.component.GenericComponentInteractionCreateEvent
deferEdit, deferReply, getChannel, getComponentId, getComponentType, getHook, getMessage, getMessageIdLong, replyModal, replyWithPremiumRequiredMethods inherited from class net.dv8tion.jda.api.events.interaction.GenericInteractionCreateEvent
getChannelIdLong, getContext, getEntitlements, getGuild, getGuildLocale, getIdLong, getIntegrationOwners, getMember, getToken, getTypeRaw, getUser, getUserLocale, isAcknowledgedMethods inherited from class net.dv8tion.jda.api.events.Event
getJDA, getRawData, getResponseNumber, toStringMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.dv8tion.jda.api.interactions.components.buttons.ButtonInteraction
editButtonMethods inherited from interface net.dv8tion.jda.api.interactions.components.ComponentInteraction
getChannel, getComponentId, getComponentType, getGuildChannel, getMessage, getMessageId, getMessageIdLongMethods 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, editMessageAttachments, editMessageAttachments, editMessageEmbeds, editMessageEmbeds, editMessageFormatMethods inherited from interface net.dv8tion.jda.api.interactions.callbacks.IModalCallback
replyModalMethods inherited from interface net.dv8tion.jda.api.interactions.Interaction
getChannelId, getChannelIdLong, getChannelType, getContext, getEntitlements, getGuild, getGuildLocale, getIntegrationOwners, getJDA, getMember, getMessageChannel, getToken, getType, getTypeRaw, getUser, getUserLocale, isAcknowledged, isFromAttachedGuild, isFromGuildMethods inherited from interface net.dv8tion.jda.api.interactions.callbacks.IPremiumRequiredReplyCallback
replyWithPremiumRequiredMethods inherited from interface net.dv8tion.jda.api.interactions.callbacks.IReplyCallback
deferReply, deferReply, reply, reply, replyComponents, replyComponents, replyEmbeds, replyEmbeds, replyFiles, replyFiles, replyFormat, replyPollMethods inherited from interface net.dv8tion.jda.api.entities.ISnowflake
getId, getIdLong, getTimeCreated
-
Constructor Details
-
ButtonInteractionEvent
public ButtonInteractionEvent(@Nonnull JDA api, long responseNumber, @Nonnull ButtonInteraction interaction)
-
-
Method Details
-
getInteraction
Description copied from class:GenericInteractionCreateEventTheInteractioninstance.
Note that this event is a delegate which implements the same interface.- Overrides:
getInteractionin classGenericComponentInteractionCreateEvent- Returns:
- The
Interaction
-
getComponent
Description copied from interface:ComponentInteractionTheActionComponentinstance.- Specified by:
getComponentin interfaceButtonInteraction- Specified by:
getComponentin interfaceComponentInteraction- Overrides:
getComponentin classGenericComponentInteractionCreateEvent- Returns:
- The
ActionComponent
-
getButton
Description copied from interface:ButtonInteractionTheButtonthis interaction belongs to.- Specified by:
getButtonin interfaceButtonInteraction- Returns:
- The
Button - See Also:
-