import { Client, Collection, Guild } from "discord.js"; import { PrismaClient } from "@prisma/client"; import { BaseEntry, BaseGuildCache, iBaseGuildCache } from "../"; export type iBaseBotCache
, BC extends BaseBotCache
> = new (GCClass: iBaseGuildCache
, bot: Client, prisma: P) => BC; /** * A class that contains global information about the Discord Bot. * Contains all GuildCache of each guild. * * Only one instance of this class should exist. */ export default abstract class BaseBotCache
> {
private readonly GCClass;
/**
* The Discord Client that is used to interact with the Discord API.
*/
readonly bot: Client;
readonly prisma: P;
/**
* The collection that contains all GuildCaches.
*/
readonly caches: Collection ,
/**
* The Discord Client that is used to interact with the Discord API.
*/
bot: Client, prisma: P);
/**
* Get a Guild's cache.
*
* @param guild Guild class from Discord
* @returns A promise that returns the GuildCache of the guild
*/
getGuildCache(guild: Guild): Promise