Skip to content

Commit

Permalink
fix: user can be missing
Browse files Browse the repository at this point in the history
  • Loading branch information
didinele committed Apr 12, 2024
1 parent 93d452f commit 8299e52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/discord.js/src/client/actions/MessageCreate.js
Expand Up @@ -16,7 +16,7 @@ class MessageCreateAction extends Action {
}

const existing = channel.messages.cache.get(data.id);
if (existing && existing.author.id !== this.client.user.id) return { message: existing };
if (existing && existing.author?.id !== this.client.user.id) return { message: existing };
const message = existing ?? channel.messages._add(data);
channel.lastMessageId = data.id;

Expand Down

0 comments on commit 8299e52

Please sign in to comment.