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,6 +1,6 @@
'use strict';
const BaseManager = require('./BaseManager');
const CachedManager = require('./CachedManager');
const GuildChannel = require('../structures/GuildChannel');
const PermissionOverwrites = require('../structures/PermissionOverwrites');
const ThreadChannel = require('../structures/ThreadChannel');
@@ -9,11 +9,11 @@ const { ChannelTypes, ThreadChannelTypes } = require('../util/Constants');
/**
* Manages API methods for GuildChannels and stores their cache.
* @extends {BaseManager}
* @extends {CachedManager}
*/
class GuildChannelManager extends BaseManager {
class GuildChannelManager extends CachedManager {
constructor(guild, iterable) {
super(guild.client, iterable, GuildChannel);
super(guild.client, GuildChannel, iterable);
/**
* The guild this Manager belongs to