
io.github.freya022.botcommands.api.pagination.menu.Menu.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of BotCommands Show documentation
Show all versions of BotCommands Show documentation
A Kotlin-first (and Java) framework that makes creating Discord bots a piece of cake, using the JDA library.
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