I am trying to create a function of my discord bot where on a command it prints the names of online members in a specific channel to the chat. I can get the bot to print all members of a channel but cannot get it to isolate only the online members.
My current code is thus
linkchannel = int(message.channel.topic)
channel = client.get_channel(linkchannel)
members = channel.members
names = [] #(list)
for member in members:
if member.Status == discord.client.Status.online:
names.append(member.name)
print(names)
await message.channel.send(names)
it returns the error 'Member has no attribute Status' despite the docs stating it does. It has also previously failed to identify discord.Status as a valid path despite the documentation stating it is. Any help would be appreciated. My bot has access to all permissions including all privileged gateway intents