title: discord.py bot edit snipe command that snipes the recently edited message
body: <p>I've been working on a discord bot and I was able to create the snipe command that, well snipes the recent deleted message but now I'm trying to program it to be able to edit snipe which is to snipe the recently edited message</p>
  <p>Here is my snipe deleted messages code</p>
  <pre><code>    async def on_ready(self):
          print('Snipe commands are working')
  
  
      @commands.Cog.listener()
      async def on_message_delete(self, message):
  
          global snipe_message_content
          global snipe_message_author
          global snipe_message_id
          global snipe_message_channel
          global snipe_message_author_avatar
          global a
          global b
  
          snipe_message_content = message.content
          snipe_message_author = message.author.id
          snipe_message_id = message.id
          snipe_message_channel = message.channel
          snipe_message_author_avatar = message.author.avatar_url
          a = message.author.name
          b = message.author.discriminator
          
          if (snipe_message_author in botsid):
              m == 1
          else:
              embed = discord.Embed(description=f&quot;️ **Message sent by** &lt;@!{snipe_message_author}&gt; **deleted in** {message.channel.mention} \n  \n {snipe_message_content}&quot;)
              embed.set_author(name= f&quot;‎‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎‏‏‎ ‎{message.author.name}#{message.author.discriminator}&quot;)
              channel = self.client.get_channel(795726497922809947)
              await channel.send(embed=embed)
  </code></pre>