mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-19 04:53:30 +01:00
Switch from for..of to forEach
This commit is contained in:
@@ -137,12 +137,12 @@ class Message {
|
|||||||
Object.defineProperty(this.mentions, 'members', {
|
Object.defineProperty(this.mentions, 'members', {
|
||||||
get: () => {
|
get: () => {
|
||||||
if (this.channel.type !== 'text') return null;
|
if (this.channel.type !== 'text') return null;
|
||||||
const memberMentions = new Collection();
|
const members = new Collection();
|
||||||
for (const mention of this.mentions.users.values()) {
|
this.mentions.users.forEach(user => {
|
||||||
const member = this.client.resolver.resolveGuildMember(this.guild, mention);
|
const member = this.client.resolver.resolveGuildMember(this.guild, user);
|
||||||
if (member) memberMentions.set(member.id, member);
|
if (member) members.set(member.id, member);
|
||||||
}
|
});
|
||||||
return memberMentions;
|
return members;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user