Package net.dv8tion.jda.api.entities
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
Allows to
limit
the amount to retrieve for better performance!-
Field Summary
Fields inherited from class net.dv8tion.jda.internal.requests.RestActionImpl
LOG
-
Method Summary
Modifier and TypeMethodDescriptionLimit between 1-100 messages that should be retrieved.Methods inherited from class net.dv8tion.jda.internal.requests.RestActionImpl
complete, deadline, getCheck, getDefaultFailure, getDefaultSuccess, getDefaultTimeout, getJDA, handleResponse, isPassContext, priority, queue, setCheck, setDefaultFailure, setDefaultSuccess, setDefaultTimeout, setErrorMapper, setPassContext, submit
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.dv8tion.jda.api.requests.RestAction
addCheck, and, and, complete, completeAfter, delay, delay, delay, delay, flatMap, flatMap, map, mapToResult, onErrorFlatMap, onErrorFlatMap, onErrorMap, onErrorMap, onSuccess, queue, queue, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, submit, submitAfter, submitAfter, timeout, zip
-
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, ornull
to use default 50- Returns:
- The current MessageRetrieveAction for chaining convenience
- Throws:
IllegalArgumentException
- If the provided limit is not between 1-100
-