Package com.jagrosh.jdautilities.menu
Class EmbedPaginator
java.lang.Object
com.jagrosh.jdautilities.menu.Menu
com.jagrosh.jdautilities.menu.EmbedPaginator
A
Menu
implementation, nearly identical to
Paginator
, that displays an individual
MessageEmbed
on each page instead of a list of text items.
Like Paginator, reaction functions allow the user to traverse to the last page using the left arrow, the next page using the right arrow, and to stop the EmbedPaginator prematurely using the stop reaction.
- Author:
- Andre_601
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
ModifierConstructorDescriptionprotected
EmbedPaginator
(EventWaiter waiter, Set<net.dv8tion.jda.api.entities.User> users, Set<net.dv8tion.jda.api.entities.Role> roles, long timeout, TimeUnit unit, BiFunction<Integer, Integer, String> text, Consumer<net.dv8tion.jda.api.entities.Message> finalAction, boolean waitOnSinglePage, List<net.dv8tion.jda.api.entities.MessageEmbed> embeds, int bulkSkipNumber, boolean wrapPageEnds, String leftText, String rightText, boolean allowTextInput) -
Method Summary
Modifier and TypeMethodDescriptionvoid
display
(net.dv8tion.jda.api.entities.channel.middleman.MessageChannel channel) Begins pagination on page 1 as a newMessage
in the providedMessageChannel
.void
display
(net.dv8tion.jda.api.entities.Message message) Begins pagination on page 1 displaying this by editing the providedMessage
.void
paginate
(net.dv8tion.jda.api.entities.channel.middleman.MessageChannel channel, int pageNum) Begins pagination as a newMessage
in the providedMessageChannel
, starting on whatever page number is provided.void
paginate
(net.dv8tion.jda.api.entities.Message message, int pageNum) Begins pagination displaying this by editing the providedMessage
, starting on whatever page number is provided.Methods inherited from class com.jagrosh.jdautilities.menu.Menu
isValidUser, isValidUser
-
Field Details
-
BIG_LEFT
- See Also:
-
LEFT
- See Also:
-
STOP
- See Also:
-
RIGHT
- See Also:
-
BIG_RIGHT
- See Also:
-
-
Constructor Details
-
EmbedPaginator
protected EmbedPaginator(EventWaiter waiter, Set<net.dv8tion.jda.api.entities.User> users, Set<net.dv8tion.jda.api.entities.Role> roles, long timeout, TimeUnit unit, BiFunction<Integer, Integer, String> text, Consumer<net.dv8tion.jda.api.entities.Message> finalAction, boolean waitOnSinglePage, List<net.dv8tion.jda.api.entities.MessageEmbed> embeds, int bulkSkipNumber, boolean wrapPageEnds, String leftText, String rightText, boolean allowTextInput)
-
-
Method Details
-
display
public void display(net.dv8tion.jda.api.entities.channel.middleman.MessageChannel channel) Begins pagination on page 1 as a newMessage
in the providedMessageChannel
. -
display
public void display(net.dv8tion.jda.api.entities.Message message) Begins pagination on page 1 displaying this by editing the providedMessage
. -
paginate
public void paginate(net.dv8tion.jda.api.entities.channel.middleman.MessageChannel channel, int pageNum) Begins pagination as a newMessage
in the providedMessageChannel
, starting on whatever page number is provided.- Parameters:
channel
- The MessageChannel to send the new Message topageNum
- The page number to begin on
-
paginate
public void paginate(net.dv8tion.jda.api.entities.Message message, int pageNum) Begins pagination displaying this by editing the providedMessage
, starting on whatever page number is provided.- Parameters:
message
- The MessageChannel to send the new Message topageNum
- The page number to begin on
-