Package com.dianxin.tori.api.interaction
Interface IButtonHandler
public interface IButtonHandler
Represents a handler for a specific Discord Button interaction.
Implement this interface to define the behavior when a user clicks a custom button.
-
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(net.dv8tion.jda.api.events.interaction.component.ButtonInteractionEvent event) Executes the specific logic when the associated button is clicked.@NotNull net.dv8tion.jda.api.components.buttons.ButtonGets the Discord Button component associated with this handler.
-
Method Details
-
getButton
@NotNull @NotNull net.dv8tion.jda.api.components.buttons.Button getButton()Gets the Discord Button component associated with this handler.- Returns:
- The configured
Buttoninstance.
-
execute
void execute(net.dv8tion.jda.api.events.interaction.component.ButtonInteractionEvent event) Executes the specific logic when the associated button is clicked.- Parameters:
event- TheButtonInteractionEventtriggered by the user.
-