Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
8 changes: 6 additions & 2 deletions source/library/services/prompts/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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...`);

Expand Down Expand Up @@ -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;
}
Expand Down
Loading