Preview environment

class VoiceStateManager

export class VoiceStateManager extends CachedManager<Snowflake, VoiceState, typeof VoiceState>

Manages API methods for VoiceStates and stores their cache.

readonly
cache : Collection<Key, Holds>

The cache of items for this manager.

Inherited from: DataManager

readonly
client : Client

The client that instantiated this Manager

Inherited from: BaseManager

guild : Guild

The guild this manager belongs to

readonly
holds : Constructable<Holds>

The data structure belonging to this manager.

Inherited from: DataManager

fetch(
member: GuildMemberResolvable | '@me'
) : Promise<VoiceState>

Obtains a user's voice state from discord or from the cache if it's already available.

Examples:
// Fetch a member's voice state
guild.voiceStates.fetch("66564597481480192")
   .then(console.log)
   .catch(console.error);

resolve(
idOrInstance: Holds
) : Holds

Resolves a data entry to a data Object.

Returns: An instance from this Manager

resolveId(
idOrInstance: Key | Holds
) : Key

Resolves a data entry to an instance id.

valueOf() : Collection<Key, Holds>

Inherited from: DataManager