I am trying to get all the members in a guild using Discord.js v12. This is what I have:
const list = client.guilds.cache.get("720352141709148200");
list.members.forEach(member => {
//do stuff with guild memebrs here
}
I have looked at this stack overflow question but I believe it's out of date as it throws an error saying that guilds
is undefined. This is the error I get with the modified-ish code I have above:
TypeError: list.members.forEach is not a function