列出没有共同公会的好友,discord.py 重写

List friends that share no mutual guilds, discord.py rewrite

我试过下面的代码,但我收到了这个错误。我显然没有正确的属性,但我在文档中找不到它。

AttributeError: type object 'User' has no attribute 'mutual_guilds

@bot.command()
async def C(ctx):
    for user in bot.user.friends:
        if user.mutual_guilds == None:
            print ("Friend: " + user.name+"#"+user.discriminator)

mutual_guildsUser 的 属性 Profile

@bot.command()
async def C(ctx):
    for user in bot.user.friends:
        profile = await user.profile()
        if not profile.mutual_guilds:
            print ("Friend: " + user.name+"#"+user.discriminator)