title: Discord.py how do I send a DM to anyone I want through a command
body: <p>Someone asked me to make a bot for him that sends a DM to anyone he specifies through a command, like <code>*send_dm @Jess#6461 hello</code>.</p>
  
  <p>I've searched alot and I came across this code:</p>
  
  <pre class="lang-py prettyprint-override"><code>async def send_dm(ctx,member:discord.Member,*,content):
      await client.send_message(member,content)
  </code></pre>
  
  <p>but then I got the error:</p>
  
  <blockquote>
    <p>discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'Bot' object has no attribute 'send_message'</p>
  </blockquote>
  
  <p>I want to type for example : <code>*send_dm @Jess#6461 hello</code> and the bot sends a DM saying "hello" to that user.</p>