Bind for button that switches pagination to the page specified by user.

Hierarchy

  • default
    • PageTravelButton

Constructors

  • Bind for button that switches pagination to the page specified by user.

    Parameters

    • Optional style: default

      Styling for button.

    Returns PageTravelButton

Properties

_duration: number = 15000
_endPhrase: string = ...
_endTip: string | LocaleGenerator = ...
_startTip: string | LocaleGenerator = ...
_travelSet: Set<string> = ...

Accessors

  • get action(): ButtonAction
  • Returns

    Action that is called after the button is pressed.

    Returns ButtonAction

  • get builtComponent(): ButtonBuilder
  • Returns

    Ready button builder.

    Returns ButtonBuilder

  • get data(): Partial<default>
  • Returns

    Button's styling.

    Returns Partial<default>

  • get duration(): number
  • Returns

    Page travel duration.

    Returns number

  • get endPhrase(): string
  • Returns

    Phrase that stops page travel.

    Returns string

  • get endTip(): string | LocaleGenerator
  • Returns

    Tip that will appear when person presses button but he's already travelling through pages.

    Returns string | LocaleGenerator

  • get switch(): ButtonSwitch
  • Returns

    Action that is called to switch button's state.

    Returns ButtonSwitch

Methods

  • Handles collect event for message collector.

    Returns

    Parameters

    • message: Message<boolean>

      Message that user wrote.

    • pagination: default

      Pagination that should be updated.

    • collector: MessageCollector

      Message collector.

    Returns Promise<void>

  • Action that switches pagination to the page specified by user.

    Returns

    Parameters

    • pagination: default

      Pagination.

    • interaction: ButtonInteraction<CacheType>

    Returns Promise<unknown>

  • Sets action that is called after the button is pressed.

    Returns

    Parameters

    • action: ButtonAction

      Action that is called after the button is pressed.

    Returns PageTravelButton

  • Sets buttons data.

    Returns

    Parameters

    • data: default | Partial<default>

      Either an interface for button styling or the class to be built from.

    Returns PageTravelButton

  • Sets duration for page travel.

    Returns

    Parameters

    • duration: number

      Page travel duration.

    • bypassLimits: boolean = false

      Should this method bypass limits of library or not.

    Returns PageTravelButton

  • Sets phrase that ends page travel.

    Returns

    Parameters

    • phrase: string

      Phrase that ends page travel.

    Returns PageTravelButton

  • Sets tip that will appear when person presses button but he's already travelling through pages.

    Returns

    Parameters

    • tip: string | LocaleGenerator

      Tip that will appear when person presses button but he's already travelling through pages.

    Returns PageTravelButton

  • Sets action that is called to switch button's state.

    Returns

    Parameters

    • switchFunction: ButtonSwitch

      Action that is called to switch button's state.

    Returns PageTravelButton

  • Converts button styling to JSON-like object.

    Returns

    JSON-like object.

    Returns default

  • Switch that never disables the button.

    Returns

    Returns false

Generated using TypeDoc