hennus-api
Version:
Esta es una libreria para el bot Hennus
33 lines (32 loc) • 869 B
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.cacheManager = void 0;
const collection_1 = require("@discordjs/collection");
class cacheManager {
constructor(client, iterable) {
this.client = client;
Object.defineProperty(this, "client", { value: client });
this._cache = new collection_1.Collection(iterable);
}
;
get rest() {
return this.client.rest;
}
;
get cache() {
return this._cache;
}
;
resolve(data) {
if (!data)
return undefined;
if (typeof data === 'object' && this.cache.get(data.id))
return this.cache.get(data.id);
if (typeof data === "string" && this.cache.get(data))
return this.cache.get(data);
return undefined;
}
;
}
exports.cacheManager = cacheManager;
;