diff --git a/src/server/components/UserDatabase.js b/src/server/components/UserDatabase.js index 17fe497..4dd957a 100644 --- a/src/server/components/UserDatabase.js +++ b/src/server/components/UserDatabase.js @@ -69,7 +69,7 @@ class UserDatabase extends AbstractUserDatabase { let user = this.cache.find((u) => u.externalProfiles.discord?.id === profile.id); if (user) return Promise.resolve(user); - const data = await this.collection.findOne({ 'discord.id': profile.id }); + const data = await this.collection.findOne({ 'externalProfiles.discord.id': profile.id }); if (data) user = this._createUser(data); else { this.logger.info(`Creating new user from Discord profile: ${profile.username} (${profile.id})`);