title: discord.py edited message logging issue
body: <p>So, I've making some code that will allow me to log edited messages to a certain channel. Here is the code:</p>
  <pre><code>async def on_message_edit(message_before, message_after):
      embed=discord.Embed(title=&quot;{} edited a message&quot;.format(message_before, message.author), description=&quot;&quot;, color=0xFFFF00)
      embed.add_field(name= message_before.content ,value=&quot;This is the message before the edit:&quot;, inline=True)
      embed.add_field(name= message_after.content ,value=&quot;This is the message after the edit&quot;, inline=True)
      channel=bot.get_channel(747057143630528563)
      await channel.send(embed=embed) 
  </code></pre>
  <p>However, when I run the code, I get the error message:</p>
  <p>Ignoring exception in on_message_edit
  Traceback (most recent call last):
  File &quot;C:\Users\jackt\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\client.py&quot;, line 333, in _run_event
  await coro(*args, **kwargs)
  File &quot;C:\Users\jackt\Desktop\bot.py&quot;, line 92, in on_message_edit
  embed=discord.Embed(title=&quot;{} edited a message&quot;.format(message_before, message.author), description=&quot;&quot;, color=0xFFFF00)
  NameError: name 'message' is not defined</p>
  <p>What part of the code do I need to change, and what do I need to change about it? Thanks.</p>