diff --git a/src/main/java/com/github/ygimenez/method/Pages.java b/src/main/java/com/github/ygimenez/method/Pages.java index bdbe3a6..1511c91 100644 --- a/src/main/java/com/github/ygimenez/method/Pages.java +++ b/src/main/java/com/github/ygimenez/method/Pages.java @@ -1690,6 +1690,8 @@ public static void finalizeEvent(Message msg, Consumer callback) { * Utility method for switching pages and applying message button states. * * @param msg The {@link Message} holding the buttons. + * @param p The current {@link Page}. + * @param helper The {@link BaseHelper} responsible for this event. * @param changes {@link Map} containing desired changes, indexed by {@link Button} ID. */ public static void modifyButtons(Message msg, Page p, BaseHelper helper, Map> changes) { diff --git a/src/main/java/com/github/ygimenez/model/helper/BaseHelper.java b/src/main/java/com/github/ygimenez/model/helper/BaseHelper.java index 46f4408..444803b 100644 --- a/src/main/java/com/github/ygimenez/model/helper/BaseHelper.java +++ b/src/main/java/com/github/ygimenez/model/helper/BaseHelper.java @@ -18,7 +18,7 @@ * {@link Pages} methods. * * @param A class that extends {@link BaseHelper}. - * @param The type of collection used to store pages. + * @param The type of collection used to store pages. */ public abstract class BaseHelper, T> { private final Class subClass; @@ -30,6 +30,13 @@ public abstract class BaseHelper, T> { private long time = 0; private Predicate canInteract = null; + /** + * Constructor for {@link BaseHelper}. + * + * @param subClass A class that extends {@link BaseHelper}. + * @param buttons The collection used to store pages. + * @param useButtons Whether to use interaction buttons or not. + */ protected BaseHelper(Class subClass, T buttons, boolean useButtons) { this.subClass = subClass; this.content = buttons; @@ -123,6 +130,8 @@ public Helper setCanInteract(@Nullable Predicate canInteract) { /** * Retrieves the {@link List} of {@link Component}s generated by this helper. * + * @param action A message event (either create or edit). + * @param Generic for a {@link MessageRequest} * @return The list of components. */ public abstract > List getComponents(Out action); @@ -137,8 +146,8 @@ public Helper setCanInteract(@Nullable Predicate canInteract) { *
{@code helper.apply(channel.sendMessage("Hello world!")).queue();}
* * @param action A message event (either create or edit). + * @param Generic for a {@link MessageRequest} * @return The same event, but modified to include the buttons. - * @param Generic for a {@link MessageRequest} */ public > Out apply(Out action) { return action.setComponents(getComponents(action));