From 3334186bf6c27b3766ef5d2491f2f09c31056889 Mon Sep 17 00:00:00 2001 From: Chew Date: Tue, 1 Feb 2022 12:15:10 -0600 Subject: [PATCH] docs cleanup + System.currentTimeMillis --- .../menu/ButtonEmbedPaginator.java | 28 +++++++------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/menu/src/main/java/com/jagrosh/jdautilities/menu/ButtonEmbedPaginator.java b/menu/src/main/java/com/jagrosh/jdautilities/menu/ButtonEmbedPaginator.java index a08eb689..d50a14f9 100644 --- a/menu/src/main/java/com/jagrosh/jdautilities/menu/ButtonEmbedPaginator.java +++ b/menu/src/main/java/com/jagrosh/jdautilities/menu/ButtonEmbedPaginator.java @@ -31,7 +31,6 @@ import net.dv8tion.jda.internal.utils.Checks; import org.slf4j.LoggerFactory; -import java.time.Instant; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; @@ -82,8 +81,7 @@ protected ButtonEmbedPaginator(EventWaiter waiter, Set users, Set ro } /** - * Begins pagination on page 1 as a new {@link net.dv8tion.jda.api.entities.Message Message} - * in the provided {@link net.dv8tion.jda.api.entities.MessageChannel MessageChannel}. + * Begins pagination on page 1 as a new {@link Message} in the provided {@link MessageChannel}. * * @param channel The MessageChannel to send the new Message to */ @@ -93,8 +91,7 @@ public void display(MessageChannel channel) { } /** - * Begins pagination on page 1 displaying this by editing the provided - * {@link net.dv8tion.jda.api.entities.Message Message}. + * Begins pagination on page 1 displaying this by editing the provided {@link Message}. * * @param message The Message to display the Menu in */ @@ -104,9 +101,8 @@ public void display(Message message) { } /** - * Begins pagination as a new {@link net.dv8tion.jda.api.entities.Message Message} - * in the provided {@link net.dv8tion.jda.api.entities.MessageChannel MessageChannel}, starting - * on whatever page number is provided. + * Begins pagination as a new {@link Message} in the provided {@link MessageChannel}, starting on whatever + * page number is provided. * * @param channel The MessageChannel to send the new Message to * @param pageNum The page number to begin on @@ -121,11 +117,10 @@ else if (pageNum > embeds.size()) } /** - * Begins pagination displaying this by editing the provided - * {@link net.dv8tion.jda.api.entities.Message Message}, starting on whatever - * page number is provided. + * Begins pagination displaying this by editing the provided {@link Message}, starting on whatever page number + * is provided. * - * @param message The MessageChannel to send the new Message to + * @param message The message to edit * @param pageNum The page number to begin on */ public void paginate(Message message, int pageNum) { @@ -144,7 +139,7 @@ private void initialize(RestAction action, int pageNum) { m.editMessage(renderPage(pageNum)).setActionRow(actions).queue(v -> pagination(m, pageNum)); } else if (waitOnSinglePage) { - String id = Instant.now().toString() + ":STOP"; + String id = System.currentTimeMillis() + ":STOP"; m.editMessage(renderPage(pageNum)).setActionRow(Button.of(style, id, STOP)).queue(v -> pagination(m, pageNum)); } else { finalAction.accept(m); @@ -154,7 +149,7 @@ private void initialize(RestAction action, int pageNum) { private List