2020-03-10 22:24:57 +00:00
|
|
|
exports.commands = new Map();
|
|
|
|
exports.aliases = new Map();
|
2020-12-18 02:32:19 +00:00
|
|
|
exports.info = new Map();
|
|
|
|
|
2020-12-18 20:46:59 +00:00
|
|
|
class Cache extends Map {
|
|
|
|
constructor(values) {
|
|
|
|
super(values);
|
|
|
|
this.maxValues = 1024;
|
|
|
|
}
|
|
|
|
|
|
|
|
set(key, value) {
|
|
|
|
super.set(key, value);
|
|
|
|
if (this.size > this.maxValues) this.delete(this.keys().next().value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
exports.prefixCache = new Cache();
|
|
|
|
exports.disabledCache = new Cache();
|