diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-07-20 16:36:23 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-07-20 16:36:23 -0400 |
commit | 5c242f597595b8db71875d92c0afe0a5947442a6 (patch) | |
tree | 13c2878b1e6368f17dd349194c320d2518fe2a9d /src/tasks | |
parent | b795a6e51b9ff69ed958f985908f81aff73022dc (diff) | |
parent | e2787c5a15e6b9a0c00bc7ed31fe3d1774fb8ff1 (diff) | |
download | tanzanite-5c242f597595b8db71875d92c0afe0a5947442a6.tar.gz tanzanite-5c242f597595b8db71875d92c0afe0a5947442a6.tar.bz2 tanzanite-5c242f597595b8db71875d92c0afe0a5947442a6.zip |
Merge branch 'rewrite' of https://github.com/NotEnoughUpdates/bush-bot into rewrite
Diffstat (limited to 'src/tasks')
-rw-r--r-- | src/tasks/updateCache.ts | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/tasks/updateCache.ts b/src/tasks/updateCache.ts index 1a17aef..404173b 100644 --- a/src/tasks/updateCache.ts +++ b/src/tasks/updateCache.ts @@ -24,8 +24,8 @@ export class UpdateCacheTask extends BushTask { private static async updateGlobalCache(client: BushClient): Promise<void> { const environment = config.environment; - const row = - ((await Global.findByPk(environment)) || + const row = ( + (await Global.findByPk(environment)) || (await Global.create({ environment, superUsers: [], @@ -33,7 +33,8 @@ export class UpdateCacheTask extends BushTask { blacklistedGuilds: [], blacklistedUsers: [], disabledCommands: [] - }))).toJSON() + })) + ).toJSON(); for (const option in row) { if (Object.keys(client.cache.global).includes(option)) client.cache.global[option] = row[option]; @@ -42,8 +43,8 @@ export class UpdateCacheTask extends BushTask { private static async updateGuildCache(client: BushClient): Promise<void> { const rows = await Guild.findAll(); - for (const row of rows){ - client.cache.guilds.set(row.id, row.toJSON() as Guild) + for (const row of rows) { + client.cache.guilds.set(row.id, row.toJSON() as Guild); } } } |