I am trying to get a list of members in a server using discord.py
My code is:
@client.command()
async def members(ctx):
members = ctx.guild.members
for member in members:
await ctx.send(member.name)
await ctx.send("done")
But the problem is it's sending the name of the bot only. If you figure out what's the problem in the code then can you pls help me, I want the name of all members.