Switch from for..of to forEach

This commit is contained in:
Schuyler Cebulskie
2017-03-22 01:12:46 -04:00
parent 8444f19662
commit cff7069275

View File

@@ -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;
}, },
}); });