Interface ReactionPaginationAction
-
- All Superinterfaces:
java.lang.Iterable<User>
,PaginationAction<User,ReactionPaginationAction>
,RestAction<java.util.List<User>>
public interface ReactionPaginationAction extends PaginationAction<User,ReactionPaginationAction>
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 - 100Example
// 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() ); }
- Since:
- 3.1
- See Also:
MessageReaction.retrieveUsers()
,Message.retrieveReactionUsers(String)
,Message.retrieveReactionUsers(Emote)
,MessageChannel.retrieveReactionUsersById(long, Emote)
,MessageChannel.retrieveReactionUsersById(String, Emote)
,MessageChannel.retrieveReactionUsersById(long, String)
,MessageChannel.retrieveReactionUsersById(String, String)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.dv8tion.jda.api.requests.restaction.pagination.PaginationAction
PaginationAction.PaginationIterator<E>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description MessageReaction
getReaction()
The current targetMessageReaction
-
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, isCacheEnabled, isEmpty, iterator, limit, parallelStream, 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, queue, queue, queue, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, submit, submit, submitAfter, submitAfter, zip
-
-
-
-
Method Detail
-
getReaction
@Nonnull MessageReaction getReaction()
The current targetMessageReaction
- Returns:
- The current MessageReaction
- Throws:
java.lang.IllegalStateException
- If this was created byMessage.retrieveReactionUsers(...)
orMessageChannel.retrieveReactionUsersById(...)
-
-