From e2787c5a15e6b9a0c00bc7ed31fe3d1774fb8ff1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 19 Jul 2021 21:43:08 +0000 Subject: Automatically format code --- src/lib/extensions/discord.js/BushGuild.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/lib/extensions/discord.js') 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(setting: K): Promise { - 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(setting: K, value: GuildDB[K]): Promise { 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(); } -- cgit