I'm currently trying to print all the online and dnd users from my server and I'm getting this error:
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: 'property' object is not iterable
This is the code:
@bot.command()
async def status(ctx):
for member in message.Guild.members:
if (member.status == discord.Status.online or member.status == discord.Status.dnd) and not member.bot:
print(member)