diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-10-14 21:25:17 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-10-14 21:25:17 +0200 |
commit | 5cc5ea3f046e061c338d5c990020ea4de5484d11 (patch) | |
tree | 0b4160883cd13d43beb5deeb611d5827f37a14e5 /api | |
parent | :bug: fix migration + autojoin (diff) | |
download | server-5cc5ea3f046e061c338d5c990020ea4de5484d11.tar.xz |
:art: do not automatically create default guild
Diffstat (limited to 'api')
-rw-r--r-- | api/src/util/Instance.ts | 8 |
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] } } }); + } } } |