detritus-client
Version:
A Typescript NodeJS library to interact with Discord's API, both Rest and Gateway.
22 lines (21 loc) • 665 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.VoiceStates = void 0;
const basecollection_1 = require("./basecollection");
;
/**
* VoiceState Collection
* @category Collections
*/
class VoiceStates extends basecollection_1.BaseClientCollectionCache {
insert(voiceState) {
const cache = this.insertCache(voiceState.serverId);
if (this.enabled) {
cache.set(voiceState.userId, voiceState);
}
}
get [Symbol.toStringTag]() {
return `VoiceStates (${this.caches.size.toLocaleString()} caches, ${this.size.toLocaleString()} items)`;
}
}
exports.VoiceStates = VoiceStates;