Как исправить ошибку Command raised an exception: AttributeError: 'NoneType' object has no attribute 'send'?

@client.command(aliases=['репорт'])
async def report(ctx, *, message):
    dm = client.get_user(666697612161843200)
    x = discord.Embed(title='**Report Error!**')
    x.add_field(name='Сервер:', value=ctx.guild.name, inline=False)
    x.add_field(name='ID сервера:', value=ctx.guild.id, inline=False)
    x.add_field(name='Проблема:', value=message, inline=False)
    x.set_thumbnail(url=ctx.guild.icon_url)
    x.set_author(name=ctx.author, icon_url=ctx.author.avatar_url)
    x.timestamp = datetime.datetime.utcnow()
    await dm.send(embed=x)
    await ctx.message.add_reaction('✅')
    y = discord.Embed(title='#Team B0T')
    y.add_field(name=f'**Привет {ctx.author.display_name}**', value='*ТВОЕ СООБЩЕНИЕ*')
    y.timestamp = datetime.datetime.utcnow()
    await ctx.author.send(embed=y)
    if message is None:
        await ctx.send(
            embed=discord.Embed(
                description=f'{ctx.author.name}, **Ты не указал тело репорта**',
                color=0x4f4db3))
        await ctx.message.add_reaction('❌')

Я не знаю, что является причиной этой ошибки, она появляется при попытке выполнить команду.


Ответы (0 шт):