Just wondering how i would go about getting a list of all current members in a guild and then returning this as a message?
Asked
Active
Viewed 1.3k times
3
-
1Possible duplicate of [How do I get a list of all members in a discord server using the new discord.py version?](https://stackoverflow.com/questions/56519760/how-do-i-get-a-list-of-all-members-in-a-discord-server-using-the-new-discord-py) – Patrick Haugh Aug 23 '19 at 23:53
2 Answers
4
If you want to get the amount of members in specific guild, you can use len(guild.members)
. If you'd like to get list just use guild.members
. If you want to send it, it might not work because Discord has max. 2000 characters in one message, but if your server is small then it should be good.

Dec0Dedd
- 335
- 2
- 12
-
-
1@JohnSohn I've answered this question 2 years ago. A lot has changed since that time, e.g. bot intents. – Dec0Dedd Sep 19 '21 at 20:23
-
https://stackoverflow.com/questions/56519760/how-do-i-get-a-list-of-all-members-in-a-discord-server-using-the-new-discord-py/69237608#69237608 – John Sohn Sep 20 '21 at 22:33
-
-
see post and review if you would. you are quite right, so therefore the answer needs updated. I often wonder if someone couldn't add commentary indicating the reasoning behind WHY a change was made, wouldn't that be helpful to understand ? – John Sohn Sep 21 '21 at 13:01
0
if you want to get the Member Count Use
guild.member_count
where guild is the guild object
and if you want a list, you can iterate over guild.members
and append them

ShaDii
- 47
- 5