Interface ReactionPaginationAction
- All Superinterfaces:
Iterable<User>
,PaginationAction<User,
,ReactionPaginationAction> RestAction<@Unmodifiable List<User>>
PaginationAction
that paginates the reaction users endpoint.
Note that this implementation is not considered thread-safe as modifications to the cache are not done with a lock. Calling methods on this class from multiple threads is not recommended.
Must provide not-null MessageReaction
to compile a valid
pagination route.
Limits:
Minimum - 1
Maximum - 100
Example
// Remove reactions for the specified emoji
public static void removeReaction(Message message, String emoji) {
// get paginator
ReactionPaginationAction users = message.retrieveReactionUsers(emoji);
// remove reaction for every user
users.forEachAsync((user) ->
message.removeReaction(emoji, user).queue()
);
}
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.dv8tion.jda.api.requests.restaction.pagination.PaginationAction
PaginationAction.PaginationIterator<E>, PaginationAction.PaginationOrder
-
Method Summary
Methods inherited from interface net.dv8tion.jda.api.requests.restaction.pagination.PaginationAction
cache, cacheSize, deadline, forEachAsync, forEachAsync, forEachRemaining, forEachRemainingAsync, forEachRemainingAsync, getCached, getFirst, getLast, getLastKey, getLimit, getMaxLimit, getMinLimit, getOrder, getSupportedOrders, isCacheEnabled, isEmpty, iterator, limit, order, parallelStream, reverse, setCheck, skipTo, spliterator, stream, takeAsync, takeRemainingAsync, takeUntilAsync, takeUntilAsync, takeWhileAsync, takeWhileAsync, timeout
Methods inherited from interface net.dv8tion.jda.api.requests.RestAction
addCheck, and, and, complete, complete, completeAfter, delay, delay, delay, delay, flatMap, flatMap, getCheck, getJDA, map, mapToResult, onErrorFlatMap, onErrorFlatMap, onErrorMap, onErrorMap, onSuccess, queue, queue, queue, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, submit, submit, submitAfter, submitAfter, zip
-
Method Details
-
getReaction
The current targetMessageReaction
- Returns:
- The current MessageReaction
- Throws:
IllegalStateException
- If this was created byMessage.retrieveReactionUsers(...)
orMessageChannel.retrieveReactionUsersById(...)
-