Answer the question
In order to leave comments, you need to log in
How can I get a list of server members?
I need to remove a certain role from a person by removing the reaction. The whole code is already ready, there is one thing, but I need to find out what kind of person deleted the reaction. To do this, I'm trying to find a list of all server members and find exactly the one among them. But this code, which should display all participants, only displays my bot. I need all server members
if message.content.startswith('//member'):
for guild in client.guilds:
for member in guild.members:
print(member)
Answer the question
In order to leave comments, you need to log in
This piece of code works like clockwork... I don't understand what's wrong.
Throw off what is above this code, although it is unlikely that something will change ... Does it give an error after the bot has been deduced?
If it is, then try:
if message.content.startswith('//member'):
for guild in client.guilds:
try:
for member in guild.members:
print(member)
except:
pass
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question