ygimenez/Pagination-Utils

Feature request: Add paginate without skipAmount, but keeping Predicate<User>

HeyBanditoz opened this issue · 2 comments

Is your feature request related to a problem? Please describe.
There exists

com.github.ygimenez.method.Pages#paginate(net.dv8tion.jda.api.entities.Message, java.util.List<com.github.ygimenez.model.Page>, int, java.util.concurrent.TimeUnit, int, java.util.function.Predicate<net.dv8tion.jda.api.entities.User>)

for adding pagination to a message with a Predicate, however, no such method exists to add pagination with a Predicate without a skipAmount

Describe the solution you'd like
Something like

com.github.ygimenez.method.Pages#paginate(net.dv8tion.jda.api.entities.Message, java.util.List<com.github.ygimenez.model.Page>, int, java.util.concurrent.TimeUnit, java.util.function.Predicate<net.dv8tion.jda.api.entities.User>)

the same thing (without) the int skipAmount parameter, but keeping the Predicate parameter.

Describe alternatives you've considered
Setting skipAmount in the method call to zero, which results in the buttons existing still, or setting it to -1, which causes it to traverse backwards, eventually hitting an indexOutOfBoundsException.

Additional context
N/A

Thanks for the suggestion, It'll be added in the next release.

Implemented in release 1.3.0