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 Type
    Method
    Description
    void
    execute(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.Button
    Gets 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 Button instance.
    • execute

      void execute(net.dv8tion.jda.api.events.interaction.component.ButtonInteractionEvent event)
      Executes the specific logic when the associated button is clicked.
      Parameters:
      event - The ButtonInteractionEvent triggered by the user.