Class RainlinkPlayerManager

The node manager class for managing all active players

Hierarchy (view full)

Constructors

Properties

Accessors

Methods

Constructors

Properties

manager: Rainlink

The rainlink manager

Accessors

  • get size(): number
  • Get how many elements of current database

    Returns number

    number

  • get values(): G[]
  • Get all current values of current database

    Returns G[]

    unknown[]

  • get full(): [string, G][]
  • Get all current values of current database

    Returns [string, G][]

    unknown[]

Methods

  • Internal

    Destroy a player

    Parameters

    • guildId: string = ''

    Returns Promise<void>

    The destroyed / disconnected player or undefined if none

  • Get data from database

    Type Parameters

    Parameters

    • key: string

      key of that data

    Returns undefined | D

    D

  • detete data from database and returns the deleted data

    Type Parameters

    Parameters

    • key: string

      key of that data

    Returns undefined | D

    D

  • detete all data from database

    Returns void

  • Set data from database

    Type Parameters

    Parameters

    • key: string

      the key you want to set

    • data: D

      data of that key

    Returns undefined | D

    D

  • executes a provided function once for each array element.

    Parameters

    • callback: ((value: RainlinkPlayer, key: string) => unknown)

      Callback function

        • (value, key): unknown
        • Parameters

          Returns unknown

    Returns void