title: discord.js: ReferenceError: embed is not defined
body: <pre><code>const { checkUrl } = require(&quot;check-url&quot;);
  const Discord = require(&quot;discord.js&quot;);
  
  
  module.exports = async (bot, client) =&gt; {
    console.log(&quot;Successfully logged in!&quot;);
  const ok = function ok(res) {
      if(res.ok == false) {
  const embed = new Discord.MessageEmbed()
          .setAuthor(&quot;Ramnet Status&quot;, bot.user.displayAvatarURL())
          .setColor(&quot;#7289da&quot;)
          .setThumbnail(bot.user.displayAvatarURL())
          .setFooter(&quot;Last Updated&quot;)
          .setTimestamp()
          if(res.ok == false) {
            embed.setDescription(`- Bot: &lt;:offline:825589358270349374&gt; Offline\n- Dashboard: :offline: Offline\n- Modmail (Support System): &lt;:offline:825589414628950046&gt; Offline`)
            embed.setFooter(`yes`)
          } else {
            embed.setDescription(`- Bot: :online: Online\n- Dashboard: &lt;:offline:825589414628950046&gt; Online\n- Modmail (Support System): &lt;:offline:825589414628950046&gt; Online`)
          }
      }
    }
  
  // wrap the code below in a setInterval function so it runs every 30 seconds or so
  setInterval (function () {
    checkUrl('https://mUdollar1cB0t.bencofficial.repl.co')
      .then((res) =&gt; ok(res))
      .catch((err) =&gt; console.error(err.message));
      bot.channels.cache.get('825589791441420361').send(embed);
              }, 1 * 30000); 
  
    };
  </code></pre>
  <p>bot.channels.cache.get('825589791441420361').send(embed); this is where the issue it</p>
  <p>ReferenceError: embed is not defined
  can u pls help me, this is hard for me and I would like to get it up and running</p>