Pagination that is sent as a reply to message.

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 | 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 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 array of action rows for the page with specified number.

    Returns

    Array of action rows.

    Parameters

    • page: number

      Number of page.

    Returns Promise<MessageActionRow<MessageButton, MessageActionRowComponentResolvable, APIActionRowComponent<APIMessageActionRowComponent>>[]>

  • 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: 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 MessageReplyPagination

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

  • Sends pagination as the reply to specified message.

    Returns

    Sends pagination.

    Parameters

    • sendTo: Message<boolean>

      Message 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 pagination active phase duration.

    Returns

    Pagination.

    Parameters

    • time: number

      Time in milliseconds.

    • Optional bypassLibraryLimits: boolean

      Should the time bypass library limit or not.

    Returns MessageReplyPagination

Generated using TypeDoc