PaginatorBuilder

class PaginatorBuilder(var locale: Locale? = null, val defaultGroup: Key = EMPTY_KEY)

Wrapping builder for easily creating paginators using DSL functions defined in the context classes.

Parameters

locale

Locale to use for the paginator

defaultGroup

Default page group, if any

Constructors

Link copied to clipboard
constructor(locale: Locale? = null, defaultGroup: Key = EMPTY_KEY)

Properties

Link copied to clipboard

How many "pages" should be displayed at once, from 1 to 9.

Link copied to clipboard
Link copied to clipboard

Whether to keep the paginator content on Discord when the paginator is destroyed.

Link copied to clipboard
Link copied to clipboard

Object containing paginator mutation functions.

Link copied to clipboard
var owner: UserBehavior?

Paginator owner, if only one person should be able to interact.

Link copied to clipboard

Pages container object.

Link copied to clipboard
var switchEmoji: ReactionEmoji?

Alternative switch button emoji, if needed.

Link copied to clipboard

Paginator timeout, in seconds. When elapsed, the paginator will be destroyed.

Functions

Link copied to clipboard
suspend fun mutate(body: suspend PageTransitionCallback.() -> Unit)

Mutate the paginator and pages, as pages are generated and sent.

Link copied to clipboard
fun page(page: Page)
fun page(builder: suspend EmbedBuilder.() -> Unit)

Add a page to pages, using the default group.

fun page(group: Key, page: Page)
fun page(group: Key, builder: suspend EmbedBuilder.() -> Unit)

Add a page to pages, using the given group.