summary refs log tree commit diff
path: root/api
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
commit5cc5ea3f046e061c338d5c990020ea4de5484d11 (patch)
tree0b4160883cd13d43beb5deeb611d5827f37a14e5 /api
parent:bug: fix migration + autojoin (diff)
downloadserver-5cc5ea3f046e061c338d5c990020ea4de5484d11.tar.xz
:art: do not automatically create default guild
Diffstat (limited to 'api')
-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] } } });
+		}
 	}
 }