Class for storing and modifying pagination data.

Hierarchy

Constructors

Properties

_afterSending: AfterSending
_buttons: ButtonData[] = []
_collector: InteractionCollector<ButtonInteraction<CacheType>>
_collectorOptions: CollectorOptions
_currentPage: number = 0
_embeds: MessageEmbed[] = []
_filterOptions: FilterOptions = ...
_isActive: boolean = false
_onStop: OnStop
_time: number = 0

Accessors

  • get afterSending(): null | AfterSending
  • Action that will be completed after the pagination was sent.

    Returns null | AfterSending

  • get buttons(): null | ButtonData[]
  • The buttons of this pagination. By default is an empty array.

    Returns null | ButtonData[]

  • get collector(): null | InteractionCollector<ButtonInteraction<CacheType>>
  • Collector that collects button interactions.

    Returns null | InteractionCollector<ButtonInteraction<CacheType>>

  • get currentPage(): number
  • Current page number. Zero-based. By default is zero.

    Returns number

  • get embeds(): null | MessageEmbed[]
  • Embeds of this pagination. By default is an empty array.

    Returns null | MessageEmbed[]

  • get filterOptions(): null | FilterOptions
  • Options for filtering button interactions. By default singleUserAccess and noAccessReply are true. And noAccessReplyContent is "You're disallowed to use this very pagination!".

    Returns null | FilterOptions

  • get isActive(): boolean
  • Indicates whether this pagination sent or not. By default is false.

    Returns boolean

  • get onStop(): null | OnStop
  • Action that will be completed after the pagination was stopped.

    Returns null | OnStop

  • get time(): null | number
  • How long the pagination will exist (in milliseconds). By default is zero.

    Returns null | number

Methods

  • Sets active state.

    Returns

    Active state.

    Parameters

    • active: boolean = true

      Whether to set pagination as active.

    Returns boolean

  • Sets collector of the pagination.

    Returns

    Collector that collects button interactions.

    Parameters

    • collector: InteractionCollector<ButtonInteraction<CacheType>>

      Collector that collects button interactions.

    Returns InteractionCollector<ButtonInteraction<CacheType>>

  • Sets current page number.

    Returns

    Number of the current page.

    Parameters

    • page: number = 0

      Number of the page.

    Returns number

  • Sets life-time of pagination.

    Returns

    Time in milliseconds.

    Parameters

    • time: number

      Time in milliseconds.

    Returns number

  • Setups pagination data from another pagination data.

    Returns

    Parameters

    Returns void

  • Gets ButtonData by it's customId.

    Returns

    Button data.

    Parameters

    • customId: string

      Button's customId. Should be a string.

    Returns undefined | ButtonData

  • Inserts embeds.

    Returns

    Pagination.

    Parameters

    • embeds: MessageEmbed | MessageEmbed[]

      Embed(-s) that is/are meant to be inserted.

    • Optional index: number

      Zero-based location in the array there the embed(-s) should be inserted.

    Returns PaginationData

  • Removes embed(-s) by it's/theirs index(-es) in the array of embeds.

    Returns

    Pagination.

    Parameters

    • index: number

      Zero-based location in the array from which to start removing embeds.

    • count: number = 1

      Quantity of embeds to remove.

    Returns PaginationData

  • Sets embed(-s). Overrides current embed(-s).

    Returns

    Pagination.

    Parameters

    • embeds: MessageEmbed | MessageEmbed[]

      Embed(-s) that is/are meant to be set.

    Returns PaginationData

  • Sets action that will be completed after the pagination was stopped.

    Returns

    Pagination.

    Parameters

    • action: OnStop

      Action that will be completed.

    Returns PaginationData

  • Sets pagination active phase duration.

    Returns

    Pagination.

    Parameters

    • time: number

      Time in milliseconds.

    • Optional bypassLibraryLimits: boolean

      Should the time bypass library limit or not.

    Returns PaginationData

Generated using TypeDoc