Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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
    });
});
 
PREVIOUS NEXT
Tagged: #member #server #discord #js
ADD COMMENT
Topic
Name
3+4 =