Package com.jagrosh.jdautilities.menu
Class Paginator
java.lang.Object
com.jagrosh.jdautilities.menu.Menu
com.jagrosh.jdautilities.menu.Paginator
A
Paginator.Builders can also set a Paginator to accept various forms of text-input, such as left and right text commands, and even user specified page number via text.
Menu
implementation that paginates a
set of one or more text items across one or more pages.
When displayed, a Paginator will add three reactions in the following order:
- Left Arrow - Causes the Paginator to traverse one page backwards.
- Stop - Stops the Paginator.
- Right Arrow - Causes the Paginator to traverse one page forwards.
Paginator.Builder
, two "bulk skip" reactions
will be added to allow a certain number of pages to be skipped left or right.
Paginator.Builders can also set a Paginator to accept various forms of text-input, such as left and right text commands, and even user specified page number via text.
- Author:
- John Grosh
-
Nested Class Summary
-
Field Summary
-
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 Pagination 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 Pagination 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:
-
-
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
.Starting on another page is available via
Paginator#paginate(MessageChannel, int)
. -
display
public void display(net.dv8tion.jda.api.entities.Message message) Begins pagination on page 1 displaying this Pagination by editing the providedMessage
.Starting on another page is available via
Paginator#paginate(Message, int)
. -
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 Pagination 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
-