aboutsummaryrefslogtreecommitdiff
path: root/src/lib/extensions/discord.js/BushGuild.ts
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2021-07-19 21:43:08 +0000
committergithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2021-07-19 21:43:08 +0000
commite2787c5a15e6b9a0c00bc7ed31fe3d1774fb8ff1 (patch)
tree5801b5c996c901014d8f8f3761f4873703740ad8 /src/lib/extensions/discord.js/BushGuild.ts
parentb228c3b222f37ceaa888f926811e6cfadf33e24a (diff)
downloadtanzanite-e2787c5a15e6b9a0c00bc7ed31fe3d1774fb8ff1.tar.gz
tanzanite-e2787c5a15e6b9a0c00bc7ed31fe3d1774fb8ff1.tar.bz2
tanzanite-e2787c5a15e6b9a0c00bc7ed31fe3d1774fb8ff1.zip
Automatically format code
Diffstat (limited to 'src/lib/extensions/discord.js/BushGuild.ts')
-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 e5eff21..8d3ae88 100644
--- a/src/lib/extensions/discord.js/BushGuild.ts
+++ b/src/lib/extensions/discord.js/BushGuild.ts
@@ -12,14 +12,17 @@ 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;
//@ts-ignore: idk why it thinks it doesn't exist
- this.client.cache.guilds.set(this.id, row.dataValues)
+ this.client.cache.guilds.set(this.id, row.dataValues);
return await row.save();
}