summary refs log tree commit diff
path: root/api/src/util/Instance.ts
diff options
context:
space:
mode:
authorHayden Young <hi@hbjy.dev>2021-10-15 10:33:02 +0000
committerGitHub <noreply@github.com>2021-10-15 10:33:02 +0000
commit365f15f03686f51014a8cc3200a0cbb3e03cc84a (patch)
tree0aab701def5b292d26bdabe6a507ee6b71a6332e /api/src/util/Instance.ts
parentchore: update ts-node during npm run setup (diff)
parentMerge pull request #460 from fosscord/dev (diff)
downloadserver-365f15f03686f51014a8cc3200a0cbb3e03cc84a.tar.xz
Merge branch 'master' into cdn-s3
Diffstat (limited to 'api/src/util/Instance.ts')
-rw-r--r--api/src/util/Instance.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/api/src/util/Instance.ts b/api/src/util/Instance.ts

index d1d9e1ab..7dcd126e 100644 --- a/api/src/util/Instance.ts +++ b/api/src/util/Instance.ts
@@ -10,9 +10,9 @@ export async function initInstance() { if (autoJoin.enabled && !autoJoin.guilds?.length) { let guild = await Guild.findOne({}); - if (!guild) guild = await Guild.createGuild({}); - - // @ts-ignore - await Config.set({ guild: { autoJoin: { guilds: [guild.id] } } }); + if (guild) { + // @ts-ignore + await Config.set({ guild: { autoJoin: { guilds: [guild.id] } } }); + } } }