Class PaginationEventWrapper

java.lang.Object
com.github.ygimenez.model.PaginationEventWrapper

public class PaginationEventWrapper extends Object
Wrapper for library events containing necessary data for handling.
  • Constructor Details

    • PaginationEventWrapper

      public PaginationEventWrapper(Object source, net.dv8tion.jda.api.entities.User user, net.dv8tion.jda.api.entities.channel.middleman.MessageChannel channel, String messageId, Object content, boolean isFromGuild)
      Constructs a new PaginationEventWrapper instance. You probably shouldn't be creating one yourself.
      Parameters:
      source - The source event, will be either a GenericMessageReactionEvent or a ButtonInteractionEvent.
      user - The User who triggered the event.
      channel - The MessageChannel where the event happened.
      messageId - The Message ID.
      content - The button which was pressed, will be either a MessageReaction or a Button.
      isFromGuild - Whether the event happened on a Guild or not.
  • Method Details

    • getSource

      public Object getSource()
      Retrieves source event.
      Returns:
      The source event.
    • getUser

      public net.dv8tion.jda.api.entities.User getUser()
      Retrieves the User who pressed the button.
      Returns:
      The User who pressed the button.
    • getMessageId

      public String getMessageId()
      Retrieves the Message ID.
      Returns:
      The Message ID.
    • retrieveMessage

      public net.dv8tion.jda.api.requests.RestAction<net.dv8tion.jda.api.entities.Message> retrieveMessage()
      Fetch the Message from the event's Message ID.
      Returns:
      The RestAction for retrieving the Message.
    • getContent

      public Object getContent()
      Retrieves the button which triggered the event.
      Returns:
      The button which triggered the event.
    • isFromGuild

      public boolean isFromGuild()
      Retrieves whether the event happened in a guild or not.
      Returns:
      Whether the event happened in a guild or not.