Is it possible to use Intents with the REST API? #8668
-
Hey folks, I think I'm missing something here, but I'm doing something like this in my code
However, this only returns a limited subset of members. I know this is a very common gotcha with the Thanks in advance for the help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hiya! That REST endpoint does not provide all members in a guild regardless of your allowed intents. I believe it's paginated if my memory serves me right...? If you want to get all members in a guild (i.e. how discord.js does it via the GuildMemberManager#fetch method), it's advised you use the gateway - there's a The gateway then responds with |
Beta Was this translation helpful? Give feedback.
Hiya! That REST endpoint does not provide all members in a guild regardless of your allowed intents. I believe it's paginated if my memory serves me right...?
If you want to get all members in a guild (i.e. how discord.js does it via the GuildMemberManager#fetch method), it's advised you use the gateway - there's a
REQUEST_GUILD_MEMBERS
payload that you can send, which indeed does require the intent if you desire to get all members.The gateway then responds with
GUILD_MEMBER_CHUNK
packets.