guild.members.fetch() not working from doc #1225
Answered
by
Jiralite
eric248550
asked this question in
Q&A
-
Part of the guide or code sample the question is aboutI'm using this example to fetch all members here is my code: const guild = await client.guilds.fetch(guildId);
const members = await guild.members.fetch(); Questionthis error occur:
question: how do I get all members the package I used: |
Beta Was this translation helpful? Give feedback.
Answered by
Jiralite
Aug 6, 2022
Replies: 1 comment 4 replies
-
I believe you are doing this before the client is ready. You need to do this in an event - are you not doing that? |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
eric248550
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I believe you are doing this before the client is ready. You need to do this in an event - are you not doing that?