mirror of
https://github.com/danbulant/discord.js
synced 2026-07-08 04:31:05 +00:00
Switch from for..of to forEach
This commit is contained in:
parent
8444f19662
commit
cff7069275
1 changed files with 6 additions and 6 deletions
|
|
@ -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;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue