diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-07-19 17:42:29 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-07-19 17:42:29 -0400 |
commit | 0fc87a141609fe7d6a80931b73f59c872b0bd44f (patch) | |
tree | 715d65c8801de4376845c01edfe01abedaabbc91 /src/tasks/updateCache.ts | |
parent | b023e057083f002418d2a685dbfb17faa624b6b1 (diff) | |
download | tanzanite-0fc87a141609fe7d6a80931b73f59c872b0bd44f.tar.gz tanzanite-0fc87a141609fe7d6a80931b73f59c872b0bd44f.tar.bz2 tanzanite-0fc87a141609fe7d6a80931b73f59c872b0bd44f.zip |
change some stuff
Diffstat (limited to 'src/tasks/updateCache.ts')
-rw-r--r-- | src/tasks/updateCache.ts | 12 |
1 files changed, 9 insertions, 3 deletions
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<void> { - 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<void> { - await UpdateCacheTask.updateCache(client); + await UpdateCacheTask.updateGlobalCache(client); + // await UpdateCacheTask.updateGuildCache(client); } - private static async updateCache(client: BushClient): Promise<void> { + private static async updateGlobalCache(client: BushClient): Promise<void> { 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<void> { + // client.db.query(`SELECT * FROM 'Guilds'`) + } } |