mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 04:23:31 +01:00
feat(MessageMentions): cache mentioned members (#3601)
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user