title: Discord.py rewrite Modmail System
body: <p>Pretty much I am trying to make a modmail bot for a server. Here is the code.</p>
  <pre><code>@client.event
  async def on_message(message):
      modmail_channel = discord.utils.get(client.get_all_channels(), name=&quot;bot-log&quot;)
  
      if message.author == client.user:
          return
      if str(message.channel.type) == &quot;private&quot;:
          embed = discord.Embed(color=0x00FFFF)
          embed.set_author(name=f&quot;Olympia Gaming Modmail System&quot;, icon_url=&quot;https://cdn.discordapp.com/icons/690937143522099220/34fbd058360c3d4696848592ff1c5191.webp?size=1024&quot;)
          embed.add_field(name='Report a member:', value=f&quot;React with 1️⃣ if you want to report a member.&quot;)        
          embed.add_field(name='Report a Staff Member:', value=f&quot;React with 2️⃣ if you want to report a Staff Member.&quot;)    
          embed.add_field(name='Warn Appeal:', value=f&quot;React with 3️⃣ if you would like to appeal a warning.&quot;)
          embed.add_field(name='Question:', value=f&quot;React with 4️⃣ if you have a question about our moderation system or the server rules.&quot;)
          embed.set_footer(text=&quot;Olympia Gaming | Modmail&quot;)
          msg = await message.author.send(embed=embed)
          await msg.add_reaction(&quot;1️⃣&quot;)
          await msg.add_reaction(&quot;2️⃣&quot;)
          await msg.add_reaction(&quot;3️⃣&quot;)
          await msg.add_reaction(&quot;4️⃣&quot;)
      def check(reaction, user):
         return user == message.author and str(reaction.emoji) in [&quot;1️⃣&quot;, &quot;2️⃣&quot;, &quot;3️⃣&quot;, &quot;4️⃣&quot;]
  
  
      while True:
          try:
              reaction, user = await client.wait_for(&quot;reaction_add&quot;, timeout=60, check=check)
  
              if str(reaction.emoji) == &quot;1️⃣&quot;:
                  embed = discord.Embed(color=0x00FFFF)
                  embed.set_author(name=f&quot;Olympia Gaming Modmail System&quot;, icon_url=&quot;https://cdn.discordapp.com/icons/690937143522099220/34fbd058360c3d4696848592ff1c5191.webp?size=1024&quot;)
                  embed.add_field(name='How to Report:', value=&quot;Send the ID of the person you are reporting and attach add a screen shot of them breaking a rule (can be ToS or a server rule).&quot;)        
                  embed.set_footer(text=&quot;Olympia Gaming | Report a member &quot;)
                  await message.author.send(embed=embed)
                  message, user = await client.wait_for(&quot;on_message&quot;, timeout=60, check=check)
                  embed = discord.Embed(title=f&quot;{message.content}&quot;, color=0x00FFFF)
                  await modmail_channel.send(embed=embed)
  
                 
          except asyncio.TimeoutError:
              await message.delete()
              break
  </code></pre>
  <p>The only problem with this code is it will not send the message to the modmail channel, and it keeps on repeating the original message. Can someone explain how I could fix this?</p>