Class 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 Detail

      • limit

        @Nonnull
        @CheckReturnValue
        public MessageHistory.MessageRetrieveAction limit​(@Nullable
                                                          java.lang.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:
        java.lang.IllegalArgumentException - If the provided limit is not between 1-100