Add cache helper to update user cache every 30 minutes
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Ethan Lane 2024-03-01 18:25:24 +00:00
parent 808f5e3b1c
commit 5f054b02a5
15 changed files with 85 additions and 2 deletions

View file

@ -11,6 +11,7 @@ import { Util } from "./util";
import AppDataSource from "../database/dataSources/appDataSource";
import ButtonEventItem from "../contracts/ButtonEventItem";
import { ButtonEvent } from "../type/buttonEvent";
import CacheHelper from "../helpers/CacheHelper";
export class CoreClient extends Client {
private static _commandItems: ICommandItem[];
@ -59,6 +60,10 @@ export class CoreClient extends Client {
await super.login(process.env.BOT_TOKEN);
this.guilds.cache.forEach(async (guild) => {
await CacheHelper.UpdateServerCache(guild);
});
this._util.loadEvents(this, CoreClient._eventItems);
this._util.loadSlashCommands(this);
}