Class ButtonEmbedPaginator

java.lang.Object
com.jagrosh.jdautilities.menu.Menu
com.jagrosh.jdautilities.menu.ButtonEmbedPaginator

public class ButtonEmbedPaginator extends Menu
A Menu implementation, nearly identical to EmbedPaginator, that displays an individual MessageEmbeds on each page instead of a list of text items.

Unlike Paginator, native Discord buttons are used and 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 button.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.dv8tion.jda.api.entities.emoji.Emoji
     
    static final net.dv8tion.jda.api.entities.emoji.Emoji
     
    static final net.dv8tion.jda.api.entities.emoji.Emoji
     
    static final net.dv8tion.jda.api.entities.emoji.Emoji
     
    static final net.dv8tion.jda.api.entities.emoji.Emoji
     

    Fields inherited from class com.jagrosh.jdautilities.menu.Menu

    roles, timeout, unit, users, waiter
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    ButtonEmbedPaginator(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, net.dv8tion.jda.api.interactions.components.buttons.ButtonStyle style)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    display(net.dv8tion.jda.api.entities.channel.middleman.MessageChannel channel)
    Begins pagination on page 1 as a new Message in the provided MessageChannel.
    void
    display(net.dv8tion.jda.api.entities.Message message)
    Begins pagination on page 1 displaying this by editing the provided Message.
    void
    paginate(net.dv8tion.jda.api.entities.channel.middleman.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.api.entities.Message message, int pageNum)
    Begins pagination displaying this by editing the provided Message, starting on whatever page number is provided.

    Methods inherited from class com.jagrosh.jdautilities.menu.Menu

    isValidUser, isValidUser

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • BIG_LEFT

      public static final net.dv8tion.jda.api.entities.emoji.Emoji BIG_LEFT
    • LEFT

      public static final net.dv8tion.jda.api.entities.emoji.Emoji LEFT
    • STOP

      public static final net.dv8tion.jda.api.entities.emoji.Emoji STOP
    • BIG_RIGHT

      public static final net.dv8tion.jda.api.entities.emoji.Emoji BIG_RIGHT
  • Constructor Details

    • ButtonEmbedPaginator

      protected ButtonEmbedPaginator(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, net.dv8tion.jda.api.interactions.components.buttons.ButtonStyle style)
  • Method Details

    • display

      public void display(net.dv8tion.jda.api.entities.channel.middleman.MessageChannel channel)
      Begins pagination on page 1 as a new Message in the provided MessageChannel.
      Specified by:
      display in class Menu
      Parameters:
      channel - The MessageChannel to send the new Message to
    • display

      public void display(net.dv8tion.jda.api.entities.Message message)
      Begins pagination on page 1 displaying this by editing the provided Message.
      Specified by:
      display in class Menu
      Parameters:
      message - The Message to display the Menu in
    • paginate

      public void paginate(net.dv8tion.jda.api.entities.channel.middleman.MessageChannel channel, int pageNum)
      Begins pagination as a new Message in the provided MessageChannel, starting on whatever page number is provided.
      Parameters:
      channel - The MessageChannel to send the new Message to
      pageNum - 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 provided Message, starting on whatever page number is provided.
      Parameters:
      message - The message to edit
      pageNum - The page number to begin on