Skip to content

guild members #235

Answered by TheOnlyWayUp
Fenish asked this question in Help
Discussion options

You must be logged in to vote

Guild members are not populated for user accounts by default, instead, you can subscribe to the guild to populate its members.

guild = bot.get_guild(id)
status = await guild.subscribe()
if status: # Status is a boolean on the success of guild.subscribe
    for member in guild.members:
        print(member.name)

This is only on the rebase branch, so make sure you're using it.
pip install git+https://github.com/dolfies/discord.py-self@rebase

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Fenish
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants