Reputation: 133
I am trying to program a bot, which resets the nickname of all members with a specific name. But I can't get all members but only 11. This is my code:
@tasks.loop(seconds=60)
async def nick():
for guild in client.guilds:
print(len(guild.members))
for member in guild.members:
print(member.display_name.lower())
if "uwe" in member.display_name.lower() or "baumfäller" in member.display_name.lower():
print("yup")
await member.edit(nick=None)
await aio.sleep(0.05)
I can't find anything that's wrong and the for member in guild.members:
is also in the documentation. (The bot is only in one server so I use for guild in client.guilds
)
Upvotes: 1
Views: 796