I am running a bot on a test server. There are currently three members in the channel (member_count of 3), but it only returns one member. This member is the Bot.
The code:
import discord
from discord.ext import commands
TOKEN = "<Token>"
CHANNEL_ID = 1234
@client.event
async def on_ready():
channel = client.get_channel(CHANNEL_ID)
print(channel.members)
client.run(TOKEN)
Output:
[<Member id=<> name='Bot_name' discriminator='Bot_discriminator' bot=True nick=None guild=<Guild id=<> name="Server_name" shard_id=None chunked=False member_count=3>>]