mirror of
https://github.com/danbulant/discord.js
synced 2026-06-09 17:52:55 +00:00
feat(MessageMentions): cache mentioned members (#3601)
This commit is contained in:
parent
e660ea90cc
commit
97eac663b3
1 changed files with 3 additions and 0 deletions
|
|
@ -48,6 +48,9 @@ class MessageMentions {
|
||||||
} else {
|
} else {
|
||||||
this.users = new Collection();
|
this.users = new Collection();
|
||||||
for (const mention of users) {
|
for (const mention of users) {
|
||||||
|
if (mention.member && message.guild) {
|
||||||
|
message.guild.members.add(Object.assign(mention.member, { user: mention }));
|
||||||
|
}
|
||||||
const user = message.client.users.add(mention);
|
const user = message.client.users.add(mention);
|
||||||
this.users.set(user.id, user);
|
this.users.set(user.id, user);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue