How to get ID from embeded message Discordbot

I have a question. I was wondering if it was possible to get an ID from an embed message that a discord bot sent. I can get the ID of a normal message that a Discord bot has sent, but when I send an embed, I don’t get an ID from it. Does anyone know how I can solve this? I’ve tried many things, but I’m not getting any ID back from the last embed my Discord bot sent

Thanks in advance!


 module.exports = 
  name: "reactionrole",
  description: "Sets up a reaction role message!",
  category: "info",
  usage: "Test <>",
  async execute(message, args, cmd, _client, Discord) 
    const channel = '719992310988931143';
    const channel_by_ID = _client.channels.cache.get(channel);
    console.log("Chanel ID: " + channel_by_ID) // --> Geef Chanel ID
    console.log("Laatste message ID (USER): " + channel_by_ID.lastMessageID) // --> Message ID
    const yellowTeamRole = message.guild.roles.cache.find(role => === "Davmin");
    const yellowTeamEmoji = `🌼`;

    let test = new Discord.MessageEmbed()
      .setTitle("HOUSE RULES By connecting to this Discord server, you agree to the Holy Davino house rules.")
      .setDescription("Choosing a team will allow you to interact with your teammates!nn"+ `${yellowTeamEmoji} for yellow teamn`)
      var bericht = await{embed: test}).then(embedMessage => {embedMessage.react(yellowTeamEmoji)});
      var testmessage = await"test")
    console.log("Test message: " + testmessage)
    // ID = --> Not working
    console.log("Embed: " +  bericht)


    _client.on('messageReactionAdd', async(reaction, user, globalvar) => {

      console.log("Global var (_Client.on): " + global.globalvar)
      console.log("Message ID (_Client.on): " +
      if( == global.globalvar)
        console.log("Wtf tot hier?");
        if(reaction.emoji.user === yellowTeamEmoji)
          console("We zijn der ver!!!")
        console.log("Hij geraakt er niet")


LOGS: Logs discord


var bericht = await{embed: test}).then(embedMessage => {embedMessage.react(yellowTeamEmoji)});

Here on the bericht variable, you’re sending a message then reacting to it, but you didn’t specify what it return. Therefore, embedMessage => embedMessage.react(yellowTeamEmoji)} returned undefined

If you want the bot to give you the message id back, you have to specify it.

var bericht = await{embed: test}).then(embedMessage =>{