mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 09:03:29 +01:00
fix(actions): always emit message create for own messages (#10211)
* fix(actions): always emit message create for own messages * fix: don't re-cache * fix: user can be missing --------- Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
This commit is contained in:
@@ -16,8 +16,8 @@ class MessageCreateAction extends Action {
|
||||
}
|
||||
|
||||
const existing = channel.messages.cache.get(data.id);
|
||||
if (existing) return { message: existing };
|
||||
const message = channel.messages._add(data);
|
||||
if (existing && existing.author?.id !== this.client.user.id) return { message: existing };
|
||||
const message = existing ?? channel.messages._add(data);
|
||||
channel.lastMessageId = data.id;
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user