Class MessageHistory.MessageRetrieveAction

java.lang.Object
net.dv8tion.jda.internal.requests.RestActionImpl<MessageHistory>
net.dv8tion.jda.api.entities.MessageHistory.MessageRetrieveAction
All Implemented Interfaces:
RestAction<MessageHistory>
Enclosing class:
MessageHistory

public static class MessageHistory.MessageRetrieveAction extends net.dv8tion.jda.internal.requests.RestActionImpl<MessageHistory>
Constructs a MessageHistory object with initially retrieved Messages before or after a certain pivot message id.
Allows to limit the amount to retrieve for better performance!
  • Method Details

    • limit

      @Nonnull @CheckReturnValue public MessageHistory.MessageRetrieveAction limit(@Nullable Integer limit)
      Limit between 1-100 messages that should be retrieved.
      Parameters:
      limit - The limit to use, or null to use default 50
      Returns:
      The current MessageRetrieveAction for chaining convenience
      Throws:
      IllegalArgumentException - If the provided limit is not between 1-100