StaffManager

API reference for StaffManager in @erlcjs/core.

Manager responsible for fetching, caching, and updating Staff structures.

Signature:

declare class StaffManager

#Constructors

Constructor

Modifiers

Description

(constructor)(server)

Creates an instance of StaffManager.

#Properties

Property

Modifiers

Type

Description

admins

Collection<number, Staff>

Collection cache of admins, keyed by their userId.

helpers

Collection<number, Staff>

Collection cache of helpers, keyed by their userId.

mods

Collection<number, Staff>

Collection cache of mods, keyed by their userId.

#Methods

Method

Modifiers

Description

fetchAll()

Fetches all staff members. Updates the staff cache.

updateCache(rawStaff)

Re-synchronizes the cache with the raw staff list from the API. Emits staffAdd and staffRemove events.