huruhuru - v0.0.1
    Preparing search index...

    Function formatPaginationItem

    • Format pagination item content by replacing template placeholders.

      Placeholders:

      • {{number}} => item number (index + 1)
      • {{page}} => current page number (1-based)
      • {{pages}} => total number of pages

      Behavior:

      • If item is a SectionBuilder, finds its TextDisplayBuilder components, recursively formats them and replaces the section's text components.
      • If item is a TextDisplayBuilder, replaces placeholders in its content and sets the new content with setContent.

      Type Parameters

      • T extends ItemType

        SectionBuilder or TextDisplayBuilder

      Parameters

      • item: T

        item to format

      • currentPage: number

        current page number (1-based)

      • maxPage: number

        total number of pages

      • index: number

        item index (0-based, across all items)

      Returns T

      the formatted item of the same type (T)