#Fetching all members

17 messages · Page 1 of 1 (latest)

wary talon
#

How would I fetch all users at once in a server?

night egretBOT
#

• What's your exact discord.js npm list discord.js and node node -v version?
• Post the full error stack trace, not just the top part!
• Show your code!
• Explain what exactly your issue is.
• Not a discord.js issue? Check out #useful-servers.

meager coralBOT
wary talon
#

const guild = await client.guilds.fetch("744781274052296704");

#

is that all I use to get that

meager coralBOT
wary talon
#

It isn't fetching the guild

short tundra
#

yes

#

but you dont need to fetch a guild if you have the Guilds intent

wary talon
#

Ok so i need to turn that one

#

Ok i have that turned on

#

how would I define the guild then

#

sorry I am finally migrating over from v12

short tundra
#

ooh thats fine

#
const guild = client.guilds.cache.get("744781274052296704");
await guild.members.fetch();
#

like this

wary talon
#

thanks i got it