Pagination that is sent as a reply to interaction.

Hierarchy

Constructors

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 collectorOptions(): null | CollectorOptions
  • Options for collecting button interactions.

    Returns null | CollectorOptions

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

    Returns number

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

    Returns null | EmbedBuilder[]

  • 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 messageOptions(): null | T
  • Options for sending out message.

    Returns null | T

  • 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

  • Method that handles collect event.

    Returns

    Updates pagination.

    Parameters

    • interaction: ButtonInteraction<CacheType>

      Interaction that the collector got.

    Returns Promise<void>

  • Forms collector.

    Returns

    Interaction Collector.

    Parameters

    • message: Message<boolean>

      Message that collector should stick to.

    • Optional user: User

      Used only if singleUserAccess is true. Needed only if only one user should be able to use pagination.

    Returns InteractionCollector<ButtonInteraction<CacheType>>

  • Gets actionRows with buttons for specific page.

    Returns

    ActionRows.

    Parameters

    • page: number

      Page number.

    Returns Promise<ActionRowBuilder<ButtonBuilder>[]>

  • 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

  • Method that handles stop event.

    Returns

    Updates pagination.

    Parameters

    • reason: string

      Reason of collector's stop event.

    • message: Message<boolean> | Interaction<CacheType>

      Message that was sent or Interaction that was replied.

    Returns Promise<void>

  • Inserts embeds.

    Returns

    Pagination.

    Parameters

    • embeds: Embed | EmbedBuilder | (Embed | EmbedBuilder)[]

      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 InteractionPagination

  • 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 InteractionPagination

  • Sends pagination as the reply to specified interaction.

    Returns

    Sends pagination.

    Parameters

    • sendTo: Interaction<CacheType>

      Interaction to that the reply should be sent.

    • Optional user: User

      Needed only if one user should be able to use pagination.

    Returns Promise<void>

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

    Returns

    Pagination.

    Parameters

    • embeds: Embed | EmbedBuilder | (Embed | EmbedBuilder)[]

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

    Returns InteractionPagination

Generated using TypeDoc