title: How can I make a Discord bot DM someone when I kick them
body: <p>I'm trying to make my discord bot DM a person when I kick them. I have tried some stuff but nothing ended up working. This is the current kick code:</p>
  <pre class="lang-py prettyprint-override"><code>@bot.command(name=&quot;kick&quot;, aliases=[&quot;k&quot;], help= &quot;Kicks specified user from the server.&quot;)
  async def kick(ctx, member: discord.Member, *, reason=None):
    await member.kick(reason=reason)
    await ctx.send(f'User {member} has been kicked.')
    embed=discord.Embed(
      title= f&quot;{bot.user} kicked {member}&quot;,
      color=bot.embed_color,
      timestamp = datetime.datetime.now(datetime.timezone.utc)
    )
    embed.set_author(
      name = ctx.author.name,
      icon_url = ctx.author.avatar_url
    )
    embed.set_footer(
    text = bot.footer,
    icon_url = bot.footerimg
    )
    await bot.debug_channel.send(embed = embed)
    print(&quot;Sent and embed&quot;)
    await ctx.message.add_reaction('✅')
    print(&quot;Added a reaction to a message&quot;)
  </code></pre>
  <p>Does anyone know how to make the bot send a DM?</p>