Skip to content

VoiceStateManager

VoiceStateManager ⇐ Base

Represents a Voice State Manager that handles voice state related operations.

Kind: global class
Extends: Base

new VoiceStateManager(client)

Constructs a new instance of the class.

ParamTypeDescription
clientClientThe 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.

ParamTypeDefaultDescription
voiceStatesstring | VoiceStateThe 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]booleantrueWhether to cache the voice state.
[options.force]booleanfalseWhether to force update the voice state even if it is already cached.