Is there a way to get a list of all the members in a Discord guild from the API? This is without having your bot on that server.
Is there a way to get a list of all the members in a Discord guild from the API? This is without having your bot on that server.
Normally you can't get members in guild without having admin permissions (for selfbot) or intent (for normal bot). Also the http endpoint api was disabled due to mass DM violations.
Still there's something unpatched and vulnerable websocket endpoint (i.e wss://gateway.discord.gg).
But its lazy (asynchronous). Means you have to wait and it will return members in small parts.
Please see variety of samples out there in various languages: Examples
Also note down, it will use selfbot, which ILLEGAL according to Discord's TOS.