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