When i run the code below it gives only 1 member which is the bot it self. (in my test server with the bot and me.) Is there a way to refresh/update the members cache?
console.log(MainGuild.members.cache)
When i run the code below it gives only 1 member which is the bot it self. (in my test server with the bot and me.) Is there a way to refresh/update the members cache?
console.log(MainGuild.members.cache)
You can fetch every member in a guild with GuildMemberManager.fetch()
MainGuild.members.fetch().then((members) => {
console.log(members);
// code...
});
This might also be related: None of my discord.js guildmember events are emitting