🎨 do not automatically create default guild

This commit is contained in:
Flam3rboy
2021-10-14 21:25:17 +02:00
parent 8257e2631a
commit d4b6840fae

View File

@@ -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] } } });
}
}
}