feat(Managers): add customizable caching for managers (#6013)

This commit is contained in:
1Computer1
2021-07-03 19:26:26 -04:00
committed by GitHub
parent ec06ba7ad0
commit 8c7cb0eff8
35 changed files with 498 additions and 316 deletions

View File

@@ -1,14 +1,16 @@
'use strict';
const BaseManager = require('./BaseManager');
const CachedManager = require('./CachedManager');
const VoiceState = require('../structures/VoiceState');
/**
* Manages API methods for VoiceStates and stores their cache.
* @extends {BaseManager}
* @extends {CachedManager}
*/
class VoiceStateManager extends BaseManager {
class VoiceStateManager extends CachedManager {
constructor(guild, iterable) {
super(guild.client, iterable, { name: 'VoiceState' });
super(guild.client, VoiceState, iterable);
/**
* The guild this manager belongs to
* @type {Guild}