VoiceStateManager
VoiceStateManager ⇐ Base
Represents a Voice State Manager that handles voice state related operations.
Kind: global class
Extends: Base
- VoiceStateManager ⇐
Base
- new VoiceStateManager(client)
- .cache ⇒
- ._add(voiceStates, [guildId], [options]) ⇒
VoiceState
|null
new VoiceStateManager(client)
Constructs a new instance of the class.
Param | Type | Description |
---|---|---|
client | Client | The client object used for communication with the server. |
voiceStateManager.cache ⇒
Getter method for the cache property.
Kind: instance property of VoiceStateManager
Returns: The Collection object representing the cache.
voiceStateManager._add(voiceStates, [guildId], [options]) ⇒ VoiceState
| null
Adds a voice state to the cache and returns the voice state object.
Kind: instance method of VoiceStateManager
Returns: VoiceState
| null
- The voice state object.
Param | Type | Default | Description |
---|---|---|---|
voiceStates | string | VoiceState | The voice state object or user ID. | |
[guildId] | string | ”this.guildId” | The ID of the guild the voice state belongs to. |
[options] | object | {cache: true, force: false} | Additional options for the operation. |
[options.cache] | boolean | true | Whether to cache the voice state. |
[options.force] | boolean | false | Whether to force update the voice state even if it is already cached. |