🐛 fix migration + autojoin

This commit is contained in:
Flam3rboy
2021-10-14 00:32:15 +02:00
parent ec0e2a804c
commit 4e6ffcbc4f
2 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -8,7 +8,7 @@ export async function initInstance() {
// TODO: check if any current user is not part of autoJoinGuilds
const { autoJoin } = Config.get().guild;
if (autoJoin.enabled && autoJoin.guilds?.length) {
if (autoJoin.enabled && !autoJoin.guilds?.length) {
let guild = await Guild.findOne({});
if (!guild) guild = await Guild.createGuild({});