I want to send a private message to a specific user with my discord bot. I am using discord==1.0.1 discord.py==1.3.1. I already tried using the docs (https://discordpy.readthedocs.io/en/latest/api.html?highlight=private%20message#discord.DMChannel) but i dont understand that. I tried following code, which didnt worked:
@client.command()
async def cmds(ctx):
embed = discord.Embed(title='Discord Server Befehle',
description='Description',
color=0x374883)
[...]
msg = await ctx.send(embed=embed)
await ctx.author.create_dm('Hi')
print(f'{command_prefix}help ausgeführt von {ctx.author}')