Answers for "get every member in the guild discord.js"

1

get every member of a server discord js

// Get the right server
const guild = bot.guilds.cache.get('GUILD_ID_HERE');

// Fetch and get the list named 'members'
guild.members.fetch().then(members =>
{
  	// Loop through every members
	members.forEach(member =>
    {
      // Do whatever you want with the current member
    });
});
Posted by: Guest on February-23-2021

Code answers related to "get every member in the guild discord.js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language