From 0fc87a141609fe7d6a80931b73f59c872b0bd44f Mon Sep 17 00:00:00 2001 From: IRONM00N <64110067+IRONM00N@users.noreply.github.com> Date: Mon, 19 Jul 2021 17:42:29 -0400 Subject: change some stuff --- src/tasks/updateCache.ts | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'src/tasks/updateCache.ts') diff --git a/src/tasks/updateCache.ts b/src/tasks/updateCache.ts index 3f19091..cfadeb5 100644 --- a/src/tasks/updateCache.ts +++ b/src/tasks/updateCache.ts @@ -11,15 +11,17 @@ export class UpdateCacheTask extends BushTask { }); } public async exec(): Promise { - await UpdateCacheTask.updateCache(this.client); + await UpdateCacheTask.updateGlobalCache(this.client); + // await UpdateCacheTask.updateGuildCache(this.client); await this.client.logger.verbose(`UpdateCache`, `Updated cache.`); } public static async init(client: BushClient): Promise { - await UpdateCacheTask.updateCache(client); + await UpdateCacheTask.updateGlobalCache(client); + // await UpdateCacheTask.updateGuildCache(client); } - private static async updateCache(client: BushClient): Promise { + private static async updateGlobalCache(client: BushClient): Promise { const environment = config.environment; const row = (await Global.findByPk(environment)) || @@ -36,4 +38,8 @@ export class UpdateCacheTask extends BushTask { if (client.cache[option]) client.cache[option] = row[option]; } } + + private static async updateGuildCache(client: BushClient): Promise { + // client.db.query(`SELECT * FROM 'Guilds'`) + } } -- cgit