guilded.ts
Version:
A powerful NPM module that allows you to easily interact with the Guilded API.
33 lines • 988 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.BaseManager = void 0;
const CacheCollection_1 = require("../structures/CacheCollection");
/**
* The manager of a Guilded data model.
* @example new BaseManager(client);
*/
class BaseManager {
client;
/** This cache of the manager. */
cache;
/**
* @param client The client the manager belongs to.
* @param maxCache The maximum cache size of the manager.
*/
constructor(client, maxCache = Infinity) {
this.client = client;
this.cache = new CacheCollection_1.CacheCollection(maxCache);
}
/**
* Set the maximum cache size of the manager.
* @param maxSize The maximum size of the cache.
* @returns The manager.
* @example manager.setMaxCache(100);
*/
setMaxCache(maxSize) {
this.cache.setMaxSize(maxSize);
return this;
}
}
exports.BaseManager = BaseManager;
//# sourceMappingURL=BaseManager.js.map