I was wondering is it possible to fetch through all members in the guild and get their IDs?
I made something like
msg.guild.members.forEach(guildMember => { guildMember.fetchMembers().then(console.log(guildMember.id)) })
But I got an error so I guess I did it in
TypeError: guildMember.fetchMembers is not a function
Also, I am using discord v11
Thanks in advance.
You could simply console log all user IDs like this:
msg.guild.members.forEach(guildMember => { console.log(guildMember.user.id); })
2.1m questions
2.1m answers
60 comments
57.0k users