🐛 fix migration + autojoin

This commit is contained in:
Flam3rboy committed 2021-10-14 00:32:15 +02:00
1 parent 90c5444324
commit 8257e2631a
2 files changed
+6 -3

No files matched your search

+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({});