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 | d4b6840faefed2c73b9939dafc4aff9d3665c6d5 (patch) | |
tree | 28765ae8e904095f7d3953fe23620adbd8f082b2 /api/src | |
parent | :bug: fix migration + autojoin (diff) | |
download | server-d4b6840faefed2c73b9939dafc4aff9d3665c6d5.tar.xz |
:art: do not automatically create default guild
Diffstat (limited to 'api/src')
-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] } } }); + } } } |