blob: a4f950198271a9917d1ae8b156f3f48855786f3a [file] [log] [blame]
pineafane625d782022-05-09 18:04:32 +01001import readConfig from "./readConfig.js";
2
3class Memory {
4 memory: {};
5 constructor() {
6 this.memory = {};
7 }
8
9 async readGuildInfo(guild: string): Promise<object> {
10 if (!this.memory[guild]) {
11 let guildData = await readConfig(guild);
12 this.memory[guild] = {
13 filters: guildData.filters,
14 logging: guildData.logging,
15 tickets: guildData.tickets,
16 }; // TODO: REMOVE GUILD FROM MEMORY WHEN THESE UPDATE
17 }
18 return this.memory[guild];
19 }
20}
21
22export default Memory;