PresenceManager
PresenceManager ⇐ Base
Represents a presence manager that handles the caching and retrieval of presence data.
Kind: global class
Extends: Base
- PresenceManager ⇐
Base
- new PresenceManager(client)
- .cache ⇒
- ._add(presences, [options]) ⇒
Presence
|null
new PresenceManager(client)
Constructs a new instance of the class.
Param | Type | Description |
---|---|---|
client | Client | The 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.
Param | Type | Default | Description |
---|---|---|---|
presences | string | Presence | The presence object or the ID of the presence. | |
[options] | object | Additional options for adding the presence. | |
[options.cache] | boolean | true | Whether to cache the presence object. |
[options.force] | boolean | false | Whether to force the retrieval of the presence from the cache. |