VoiceStateManager

export class VoiceStateManager extends CachedManager<Snowflake, VoiceState, typeof VoiceState>
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, options?):Promise<VoiceState>
Obtains a user's voice state from discord or from the cache if it's already available.
Example
// Fetch a member's voice state
guild.voiceStates.fetch("66564597481480192")
.then(console.log)
.catch(console.error);
// Fetch a member's voice state
guild.voiceStates.fetch("66564597481480192")
.then(console.log)
.catch(console.error);
NameTypeOptionalDescription
memberGuildMemberResolvable | '@me'NoThe member whose voice state is to be fetched
optionsBaseFetchOptionsYesAdditional options for this fetch
resolve(idOrInstance):Holds
Resolves a data entry to a data Object.
Returns
An instance from this Manager
NameTypeOptionalDescription
idOrInstanceHoldsNoThe id or instance of something in this Manager
resolveId(idOrInstance):Key
Resolves a data entry to an instance id.
Returns
NameTypeOptionalDescription
idOrInstanceKey | HoldsNoThe id or instance of something in this Manager
valueOf():Collection<Key, Holds>