From 4c09c2f3d61e44ee20cb2ddcc9b109e30840de93 Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Wed, 9 Nov 2022 17:26:00 +0200 Subject: [PATCH] fix query --- src/server/components/UserDatabase.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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})`);