
com.freya02.botcommands.api.pagination.paginator.Paginator Maven / Gradle / Ivy
package com.freya02.botcommands.api.pagination.paginator;
import com.freya02.botcommands.api.components.Components;
import com.freya02.botcommands.api.components.data.InteractionConstraints;
import com.freya02.botcommands.api.pagination.PaginatorComponents;
import com.freya02.botcommands.api.pagination.PaginatorSupplier;
import com.freya02.botcommands.api.pagination.TimeoutInfo;
import com.freya02.botcommands.api.pagination.menu.Menu;
import com.freya02.botcommands.api.utils.ButtonContent;
import org.jetbrains.annotations.NotNull;
/**
* Classic paginator, pages are supplied from {@link PaginatorBuilder#setPaginatorSupplier(PaginatorSupplier) paginator suppliers}.
*
You provide the pages, it displays them one by one.
*
Initial page is page 0, there is navigation buttons and an optional delete button
*
The delete button cannot be used if the message is ephemeral
*
*
* The button IDs used by this paginator and those registered by the {@link PaginatorComponents} in the {@link PaginatorSupplier} are cleaned up once the embed is removed with the button
*
When the message is deleted, you would also have to call {@link #cleanup()}
*
* @see Menu
*/
public final class Paginator extends BasicPaginator {
Paginator(@NotNull Components componentsService, InteractionConstraints constraints, TimeoutInfo timeout, int _maxPages, PaginatorSupplier supplier, boolean hasDeleteButton, ButtonContent firstContent, ButtonContent previousContent, ButtonContent nextContent, ButtonContent lastContent, ButtonContent deleteContent) {
super(componentsService, constraints, timeout, _maxPages, supplier, hasDeleteButton, firstContent, previousContent, nextContent, lastContent, deleteContent);
}
}