title: How can I make a bot that bans the user that dm's it?
body: <pre class="lang-js prettyprint-override"><code>import discord
  
  class client(discord.Client):
  
      async def on_ready(self):
          print('Logged in!')
  
      async def on_message(self, message):
           await ctx.guild.ban(message.author, reason=&quot;dm'ed honey le pot&quot;)
  client = client()
  client.run(&quot;mytoken&quot;)
  client.run 
  </code></pre>
  <p>I know that <code>ctx.guild.ban</code>, I can't do since <code>on_message</code> does not pass <code>ctx</code>, but how do I specify in which server to ban?</p>