Skip to content

PresenceManager

PresenceManager ⇐ Base

Represents a presence manager that handles the caching and retrieval of presence data.

Kind: global class
Extends: Base

new PresenceManager(client)

Constructs a new instance of the class.

ParamTypeDescription
clientClientThe client instance.

presenceManager.cache ⇒

Getter method for the cache property.

Kind: instance property of PresenceManager
Returns: The Collection object representing the cache.

presenceManager._add(presences, [options]) ⇒ Presence | null

Adds a presence to the cache and returns the presence object.

Kind: instance method of PresenceManager
Returns: Presence | null - The presence object that was added to the cache, or null if presences is falsy.

ParamTypeDefaultDescription
presencesstring | PresenceThe presence object or the ID of the presence.
[options]objectAdditional options for adding the presence.
[options.cache]booleantrueWhether to cache the presence object.
[options.force]booleanfalseWhether to force the retrieval of the presence from the cache.