title: How to make my discord.js-bot log the edit of a message?
body: <p>I'm trying to make my bot log when and what has been edited in a message.</p>
  <p>This is the code of the listener:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>client.on('messageUpdate', (oldMessage, newMessage,message) =&gt; {
      client.on('messageUpdate', (oldMessage, newMessage,message) =&gt; {
  const MessageLog = client.channels.cache.find(channel =&gt; channel.id ==='802262886624919572');
  var embed = new Discord.MessageEmbed()
  .setAuthor(message.author.username).catch(console.error)
  .setTimestamp(new Date())
  .setColor('#392B47')
  .addFields(
      {name: 'original:',value: oldMessage},
      {name: 'edit:', value: newMessage}    );
  MessageLog.send(embed);
   });</code></pre>
  </div>
  </div>
  </p>
  <p>So far he is having the problem fetching the message.author.username
  I have tried defyning the message with oldmessage and newmessage, but same problem there.</p>
  <p>Console log: TypeError: Cannot read property 'author' of undefined</p>