diff options
Diffstat (limited to 'src/tasks')
-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'`) + } } |