aboutsummaryrefslogtreecommitdiff
path: root/src/lib/extensions/discord.js
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-07-20 16:36:23 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-07-20 16:36:23 -0400
commit5c242f597595b8db71875d92c0afe0a5947442a6 (patch)
tree13c2878b1e6368f17dd349194c320d2518fe2a9d /src/lib/extensions/discord.js
parentb795a6e51b9ff69ed958f985908f81aff73022dc (diff)
parente2787c5a15e6b9a0c00bc7ed31fe3d1774fb8ff1 (diff)
downloadtanzanite-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/lib/extensions/discord.js')
-rw-r--r--src/lib/extensions/discord.js/BushGuild.ts7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/extensions/discord.js/BushGuild.ts b/src/lib/extensions/discord.js/BushGuild.ts
index 9b528c6..79f7c98 100644
--- a/src/lib/extensions/discord.js/BushGuild.ts
+++ b/src/lib/extensions/discord.js/BushGuild.ts
@@ -12,13 +12,16 @@ export class BushGuild extends Guild {
}
public async getSetting<K extends keyof GuildModel>(setting: K): Promise<GuildModel[K]> {
- return this.client.cache.guilds.get(this.id)?.[setting] ?? ((await GuildDB.findByPk(this.id)) ?? GuildDB.build({ id: this.id }))[setting];
+ return (
+ this.client.cache.guilds.get(this.id)?.[setting] ??
+ ((await GuildDB.findByPk(this.id)) ?? GuildDB.build({ id: this.id }))[setting]
+ );
}
public async setSetting<K extends keyof GuildModel>(setting: K, value: GuildDB[K]): Promise<GuildDB> {
const row = (await GuildDB.findByPk(this.id)) ?? GuildDB.build({ id: this.id });
row[setting] = value;
- this.client.cache.guilds.set(this.id, row.toJSON() as GuildDB)
+ this.client.cache.guilds.set(this.id, row.toJSON() as GuildDB);
return await row.save();
}