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
,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
ConstructorDescriptionButtonInteractionEvent
(JDA api, long responseNumber, ButtonInteraction interaction) -
Method Summary
Modifier and TypeMethodDescriptionTheButton
this interaction belongs to.TheActionComponent
instance.TheInteraction
instance.Methods inherited from class net.dv8tion.jda.api.events.interaction.component.GenericComponentInteractionCreateEvent
deferEdit, deferReply, getChannel, getComponentId, getComponentType, getHook, getMessage, getMessageIdLong
Methods inherited from class net.dv8tion.jda.api.events.interaction.GenericInteractionCreateEvent
getGuild, getGuildLocale, getIdLong, getMember, getToken, getTypeRaw, getUser, getUserLocale, isAcknowledged
Methods inherited from class net.dv8tion.jda.api.events.Event
getJDA, getResponseNumber
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.dv8tion.jda.api.interactions.components.buttons.ButtonInteraction
editButton
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
-
Constructor Details
-
ButtonInteractionEvent
public ButtonInteractionEvent(@Nonnull JDA api, long responseNumber, @Nonnull ButtonInteraction interaction)
-
-
Method Details
-
getInteraction
Description copied from class:GenericInteractionCreateEvent
TheInteraction
instance.
Note that this event is a delegate which implements the same interface.- Overrides:
getInteraction
in classGenericComponentInteractionCreateEvent
- Returns:
- The
Interaction
-
getComponent
Description copied from interface:ComponentInteraction
TheActionComponent
instance.- Specified by:
getComponent
in interfaceButtonInteraction
- Specified by:
getComponent
in interfaceComponentInteraction
- Overrides:
getComponent
in classGenericComponentInteractionCreateEvent
- Returns:
- The
ActionComponent
-
getButton
Description copied from interface:ButtonInteraction
TheButton
this interaction belongs to.- Specified by:
getButton
in interfaceButtonInteraction
- Returns:
- The
Button
- See Also:
-