Answers for "discrod.js get every member"

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 "discrod.js get every member"

Code answers related to "Javascript"

Browse Popular Code Answers by Language