title: Read contents of an embed message from a discord server
body: <p><strong>Scenario</strong>:
  I am trying to <strong>read</strong> various fields in an embed message posted to a sever, do some processing, and log results in a DB.</p>
  
  <p><strong>Testing</strong>:
  Using a testBot for sending relevant messages everything works when using a normal text message, but when an "embed message" is used (theoretically making it much easier to identify fields for processing etc), I can't retrieve the data.  I'm at an total loss how to access the "embed" from the message object.  </p>
  
  <p>I realize that it is about now I should pop in some code for you to examine, but I'm not even that far along !  Reading the documentation (linked to at the end) I am pretty sure is will be something to do with one of these classes:-
  message.<strong>embeds</strong>.x.y.z   or  <strong>MessageEmbed.x.y.x</strong>  </p>
  
  <p>Google has not been my friend, I can not find one example of code that reads an "Embed message" which is odd.</p>
  
  <p>Anyway, to ensure I don't look like a complete sponge I'll include the working code for the "embed sender bot".   A few people seem to have problems cracking the syntax, so it maybe of use to someone else searching on here...</p>
  
  <p>Thanks in advance for any help you can give.</p>
  
  <p><strong>Documentation Found</strong>:
  <a href="https://discord.js.org/#/docs/main/stable/class/MessageEmbed" rel="noreferrer">Docs for MessageEmbed</a>
  And;</p>
  
  <p><a href="https://discord.js.org/#/docs/main/stable/class/TextChannel?scrollTo=fetchMessage" rel="noreferrer">Embed used within message class</a></p>
  
  <p><strong>Code for test Embed sender bot:</strong></p>
  
  <pre><code>  const Discord = require("discord.js");
    const client = new Discord.Client();
    const config = require("./config.json");
  
    /* A simple bot to throw out a test "Embed message" when asked to. */
  
    client.on("message", (message) =&gt; {
    if (!message.content.startsWith(config.prefix) || message.author.bot) 
    return;
  
     if (message.content.startsWith(config.prefix + "emb")) {
     console.log("Sending an embedd message");
     message.channel.send({embed: {
      color: 3447003,
      title: "This is an embed (Title)",
      description: "Embed! (first line)\nsecond line of Desc\nthird line of 
     Desc",
      footer: 
      {
          text: "Footnote ©"
      }
    }});
  } else   if (message.content.startsWith(config.prefix + "test")) 
    {
    message.reply("Bot active");
  
  
    };
  
   });
  
    client.login(config.token);
  </code></pre>