import { Client, Guild } from "discord.js"; import { PrismaClient } from "@prisma/client"; import { BaseEntry, LogManager } from "../"; import { Alias } from "./BaseEntry"; export type iBaseGuildCache
> = new (bot: Client, guild: Guild, prisma: P) => GC; /** * A class containing information related to each Guild. * * Each Guild that the bot is in will have its own GuildCache. */ export default abstract class BaseGuildCache
> { /** * The Discord Client that is used to interact with the Discord API. */ readonly bot: Client; /** * The Discord Guild that this GuildCache is for. */ readonly guild: Guild; readonly prisma: P; /** * The instance of the logger for this Guild */ readonly logger: LogManager
;
/**
* Cached entry value
*/
entry: E;
/**
* Command aliases
*/
aliases: Alias[];
/**
* The property determining if the bot has the admin permission in this Guild
*/
isAdministrator: boolean;
constructor(
/**
* The Discord Client that is used to interact with the Discord API.
*/
bot: Client,
/**
* The Discord Guild that this GuildCache is for.
*/
guild: Guild, prisma: P);
/**
* The prefix of this Guild
*/
get prefix(): string | null;
/**
* Update the entry data
*
* @param data The data that changed in the entry
*/
update(data: Partial