Summary
I'm really new to discord.py and am trying to figure out how to retrieve a list of people in a discord server channel. I'm working on a command that would randomly separate the channel into two different calls, but I am wondering how I would retrieve the members in a voice channel, create a list of the members, randomly split them, and lastly move the members.
My main concern right now is just retrieving a list of members into a list [] format
this is what I have so far:
async def team(ctx):
team_select = [discord.VoiceChannel.members(ctx.guild.channels, id=742871631751282829)]
print(team_select)
^ this code, which I'm using to gives me the error: "TypeError: 'property' object is not callable"
https://discordpy.readthedocs.io/en/latest/api.html#discord.VoiceChannel.members
is not a function. You may be using the wrong API – Baduget_channel(id)
and later get.members
- liketeam_select = ctx.guild.get_channel(742871631751282829).members
– furas