summary refs log tree commit diff
path: root/api/src
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-10-14 21:25:17 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-10-14 21:25:17 +0200
commitd4b6840faefed2c73b9939dafc4aff9d3665c6d5 (patch)
tree28765ae8e904095f7d3953fe23620adbd8f082b2 /api/src
parent:bug: fix migration + autojoin (diff)
downloadserver-d4b6840faefed2c73b9939dafc4aff9d3665c6d5.tar.xz
:art: do not automatically create default guild
Diffstat (limited to 'api/src')
-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] } } });
+		}
 	}
 }