All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.freya022.botcommands.api.pagination.menu.Menu Maven / Gradle / Ivy

Go to download

A Kotlin-first (and Java) framework that makes creating Discord bots a piece of cake, using the JDA library.

There is a newer version: 3.0.0-alpha.22
Show newest version
package io.github.freya022.botcommands.api.pagination.menu;

import io.github.freya022.botcommands.api.components.Components;
import io.github.freya022.botcommands.api.components.data.InteractionConstraints;
import io.github.freya022.botcommands.api.pagination.PaginatorSupplier;
import io.github.freya022.botcommands.api.pagination.TimeoutInfo;
import io.github.freya022.botcommands.api.pagination.paginator.Paginator;
import io.github.freya022.botcommands.api.pagination.transformer.EntryTransformer;
import io.github.freya022.botcommands.api.utils.ButtonContent;
import org.jetbrains.annotations.NotNull;

import java.util.List;

/**
 * Paginator where pages are made from a list of entries.
 *
 * @param  Type of the entries
 * @see Paginator
 * @see ChoiceMenu
 */
public final class Menu extends BasicMenu> {
	Menu(@NotNull Components componentsService,
		 InteractionConstraints constraints,
		 TimeoutInfo> timeout,
		 boolean hasDeleteButton,
		 ButtonContent firstContent,
		 ButtonContent previousContent,
		 ButtonContent nextContent,
		 ButtonContent lastContent,
		 ButtonContent deleteContent,
		 List entries,
		 int maxEntriesPerPage,
		 EntryTransformer transformer,
		 RowPrefixSupplier rowPrefixSupplier,
		 PaginatorSupplier> supplier) {
		super(componentsService, constraints, timeout, hasDeleteButton, firstContent, previousContent, nextContent, lastContent, deleteContent,
				makePages(entries, transformer, rowPrefixSupplier, maxEntriesPerPage),
				supplier);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy