public class MentionPaginationAction extends PaginationAction<Message,MentionPaginationAction>
PaginationAction
that paginates the endpoint Route.Self.GET_RECENT_MENTIONS
.
Must provide not-null Guild
to compile a valid guild mentions
pagination route., else it uses the global pagination route.
MentionPaginationAction mentions = guild.getRecentMentions();
mentions.setEveryone(false);
for (Message message : mentions)
{
System.out.printf("%#s: %s\n", message.getAuthor(), message.getContent());
}
PaginationAction.PaginationIterator
RestAction.EmptyRestAction<T>
DEFAULT_FAILURE, DEFAULT_SUCCESS, LOG
Constructor | Description |
---|---|
MentionPaginationAction(Guild guild) |
Creates a new MentionPaginationAction
This constructor effectively makes this target specifically only the recent mentions for the specified Guild !
To get the global scope use MentionPaginationAction(net.dv8tion.jda.core.JDA) instead. |
MentionPaginationAction(JDA api) |
Creates a new MentionPaginationAction
This constructor effectively makes this target all recent mentions to get the recent mentions for a specific Guild
use MentionPaginationAction(net.dv8tion.jda.core.entities.Guild) instead! |
Modifier and Type | Method | Description |
---|---|---|
Guild |
getGuild() |
The current target
Guild for
this MentionPaginationAction. |
MentionPaginationAction |
setEveryone(boolean isEveryoneMention) |
Sets whether this MentionPaginationAction should
include mentions that mention the public role of a Guild.
|
MentionPaginationAction |
setRole(boolean isRoleMention) |
Sets whether this MentionPaginationAction should
include mentions that mention a role in a Guild.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
cache, cacheSize, forEachAsync, forEachAsync, forEachRemaining, forEachRemainingAsync, forEachRemainingAsync, getCached, getFirst, getLast, getLimit, getMaxLimit, getMinLimit, isCacheEnabled, isEmpty, iterator, limit, parallelStream, setCheck, spliterator, stream, takeAsync, takeRemainingAsync
complete, complete, completeAfter, getJDA, isPassContext, queue, queue, queue, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, queueAfter, setPassContext, submit, submit, submitAfter, submitAfter
public MentionPaginationAction(JDA api)
Guild
use MentionPaginationAction(net.dv8tion.jda.core.entities.Guild)
instead!api
- The current JDA entitypublic MentionPaginationAction(Guild guild)
Guild
!
MentionPaginationAction(net.dv8tion.jda.core.JDA)
instead.guild
- The Non-Null target Guild
java.lang.NullPointerException
- If the provided guild
is null
public Guild getGuild()
Guild
for
this MentionPaginationAction.
null
if this MentionPaginationAction does not target
mentions from a specific Guild!public MentionPaginationAction setEveryone(boolean isEveryoneMention)
true
isEveryoneMention
- Whether to include everyone mentionspublic MentionPaginationAction setRole(boolean isRoleMention)
true
isRoleMention
- Whether to include role mentions