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

io.github.freya022.botcommands.api.pagination.menu.Menu.kt 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.23
Show newest version
package io.github.freya022.botcommands.api.pagination.menu

import io.github.freya022.botcommands.api.core.BContext
import io.github.freya022.botcommands.api.pagination.Paginators

/**
 * A paginator where each page is filled with a list of entries.
 *
 * @param E Type of the entries
 *
 * @see Paginators.menu
 */
class Menu internal constructor(
    context: BContext,
    builder: MenuBuilder
) : AbstractMenu>(
    context,
    builder,
    makePages(builder.entries, builder.transformer, builder.rowPrefixSupplier, builder.maxEntriesPerPage)
) {
    object Defaults {
        /** @see MenuBuilder.setMaxEntriesPerPage */
        @JvmStatic
        var maxEntriesPerPage: Int = 5

        /** @see MenuBuilder.setRowPrefixSupplier */
        @JvmStatic
        var rowPrefixSupplier: RowPrefixSupplier = RowPrefixSupplier.paddedNumberPrefix
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy