#Problem with interaction.guild.members.fetch()

10 messages · Page 1 of 1 (latest)

meager ice
#

I want to get the id's of all users.
Code will follow

hushed saddleBOT
#

• 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 ice
#

djs: [email protected]
node: 16.10.0

let users = await interaction.guild.members.fetch()

How can i access one single user?
For example if I want to get the id of the first user in the response from ^ this, how would i do that?

Any help or redirection appreciated

next mango
#

On second

#

Here

#

You can use the methods provided

#

Or simply, if you want the first one, users.first() will suffice

meager ice
#

Awesome, thanks a lot!