#Need help to get members list
24 messages · Page 1 of 1 (latest)
Do you mean all members from all the guilds the bot is in? You will need to go through each guild your bot is in and fetch the members in that guild, I guess
Then you can just get the guild by its id and fetch members
well the guy who answered you a few hours ago is probably right, the only logical answer that comes to my mind is that that you are not using the right guild id
well using client.guilds.fetch('id'), "id" must be the guild id
you can get it like this
ye
(let's keep it in english so that if some people in the future have the same issue, they can understand what we're talking about. also i guess not speaking english is breaking one of this server rules)
maybe console.log guild to make sure it is what it is supposed to be
The guild you are trying to fetch isn't acessible from your bot or your bot is missing the GuildMembers intent
Also do not fetch all the members on the bot start if your bot is in a lot of guilds, members.fetch is highly rate limited
or your bot is missing the GuildMembers intent
don't think that's correct for that particular error
https://discord.com/developers/docs/resources/guild#list-guild-members
I'm following this definition, if it's wrong, my bad
sure, but fetching all members is a gateway thing
which is why if you do that and don't have the intent, d.js eventually throws a timeout
since nothing really arrives
Isn't related to the size of the fetch?
like if the size to fetch is greater than X, use the gateway, if not, use the normal fetch ?
cause d.js does completely different things depending on if you did fetch() or passed anything specific
True, need more context on the OP part
and if you mean if the guild.members.fetch('id') could have given the error, no. even without the intent you are allowed to fetch single members, otherwise offline members would be physically unusable.