feat(MessageMentions): cache mentioned members (#3601)

This commit is contained in:
SpaceEEC 2019-12-27 19:28:04 +01:00 committed by GitHub
parent e660ea90cc
commit 97eac663b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -48,6 +48,9 @@ class MessageMentions {
} else {
this.users = new Collection();
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);
this.users.set(user.id, user);
}