diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c0f6e818..aa357a8b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Updated all notices + the `/profile roles` command to use components V2. - Improved logging around database failures. - Added 'Politics' itself to banned topics. +- Fixed not being able to close inquiries for people who have left the server. ## 5.0.0 diff --git a/source/library/services/prompts/service.ts b/source/library/services/prompts/service.ts index af6841dac..6f7d721f6 100644 --- a/source/library/services/prompts/service.ts +++ b/source/library/services/prompts/service.ts @@ -234,7 +234,9 @@ abstract class PromptService< `Could not find existing prompt for ${document.id}. Has it been manually deleted? Recreating...`, ); - const user = this.client.entities.users.get(userId); + const user = + this.client.entities.users.get(userId) ?? + (await this.client.bot.helpers.getUser(userId).catch(() => undefined)); if (user === undefined) { this.log.warn(`Could not find the author object for ${document.id}. Invalidating submission...`); @@ -330,7 +332,9 @@ abstract class PromptService< return; } - const user = this.client.entities.users.get(userId); + const user = + this.client.entities.users.get(userId) ?? + (await this.client.bot.helpers.getUser(userId).catch(() => undefined)); if (user === undefined) { return; }