Discord bot 不会在 channel.members 中提供频道成员

时间:2021-01-13 09:37:14

标签: python discord.py

我尝试这样做:

def check_num_of_empty(channels):
    empty_channels = 0
    for i in channels:
        if i.members:
            continue
        empty_channels += 1
return empty_channels

当频道是频道列表时 如果我在频道中,它总是给出一个空列表 exept .. 有什么解决办法吗?

我也尝试过 get_channel(id).members 当 id 是频道的 id 并且它不起作用时..

我也尝试这样做

# create intents before creating bot/client instance
intents = discord.Intents().default()
intents.members = True
# create the instance
client = discord.Client(intents=intents)

它仍然不起作用

0 个答案:

没有答案