public class Paginator extends Menu
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:
Paginator.Builder
, two "bulk skip" reactions
will be added to allow a certain number of pages to be skipped left or right.
Modifier and Type | Class and Description |
---|---|
static class |
Paginator.Builder
The
Menu.Builder for
a Paginator . |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BIG_LEFT |
static java.lang.String |
BIG_RIGHT |
static java.lang.String |
LEFT |
static java.lang.String |
RIGHT |
static java.lang.String |
STOP |
Modifier and Type | Method and Description |
---|---|
void |
display(net.dv8tion.jda.core.entities.Message message)
Begins pagination on page 1 displaying this Pagination by editing the provided
Message . |
void |
display(net.dv8tion.jda.core.entities.MessageChannel channel)
Begins pagination on page 1 as a new
Message
in the provided MessageChannel . |
void |
paginate(net.dv8tion.jda.core.entities.MessageChannel channel,
int pageNum)
Begins pagination as a new
Message
in the provided MessageChannel , starting
on whatever page number is provided. |
void |
paginate(net.dv8tion.jda.core.entities.Message message,
int pageNum)
Begins pagination displaying this Pagination by editing the provided
Message , starting on whatever
page number is provided. |
isValidUser, isValidUser
public static final java.lang.String BIG_LEFT
public static final java.lang.String LEFT
public static final java.lang.String STOP
public static final java.lang.String RIGHT
public static final java.lang.String BIG_RIGHT
public void display(net.dv8tion.jda.core.entities.MessageChannel channel)
Message
in the provided MessageChannel
.
Starting on another page is available via Paginator#paginate(MessageChannel, int)
.
public void display(net.dv8tion.jda.core.entities.Message message)
Message
.
Starting on another page is available via
Paginator#paginate(Message, int)
.
public void paginate(net.dv8tion.jda.core.entities.MessageChannel channel, int pageNum)
Message
in the provided MessageChannel
, starting
on whatever page number is provided.channel
- The MessageChannel to send the new Message topageNum
- The page number to begin onpublic void paginate(net.dv8tion.jda.core.entities.Message message, int pageNum)
Message
, starting on whatever
page number is provided.message
- The MessageChannel to send the new Message topageNum
- The page number to begin on