AttributeError: 'ClientUser' object has no attribute 'create_dm' (discord.py, I'm trying to dm all members of a guild)

AttributeError: 'ClientUser' object has no attribute 'create_dm' (discord.py, I'm trying to dm all members of a guild)

我一直在尝试向公会的所有成员发送 DM,但我总是收到此错误:

AttributeError: 'ClientUser' object has no attribute 'create_dm'

这是我的代码

@bot.command()
async def send(ctx, *, message):
    for member in ctx.guild.members:
        channel = await member.create_dm()
        channel.send(message)
    await ctx.send('Messages successfully sent!')

我做错了什么?

我想通了,我必须等待 channel.send