title: Guild is not defined (Discord.js)
body: <p>I'm making a discord bot in Js and i ran into this problem where &quot;guild&quot; isn't defined. I've made discord.js bots before similar to this but i never ran into a error like this:</p>
  <pre><code>.setTitle(`Server infomation on ${guild.name}`)
                                    ^
  ReferenceError: guild is not defined
      at Object.&lt;anonymous&gt; (/home/.Ulur/Downloads/Discordia/index.js:15:36)
      at Module._compile (internal/modules/cjs/loader.js:778:30)
      at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
      at Module.load (internal/modules/cjs/loader.js:653:32)
      at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
      at Function.Module._load (internal/modules/cjs/loader.js:585:3)
      at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
      at startup (internal/bootstrap/node.js:283:19)
      at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)```
  </code></pre>
  <p>And my bot code:</p>
  <pre class="lang-js prettyprint-override"><code>const fs = require('fs');
  const Discord = require('discord.js');
  const { prefix, token } = require('./config.json');
  const client = new Discord.Client();
  client.commands = new Discord.Collection();
  const commandFiles = fs
   .readdirSync('./commands')
   .filter((file) =&gt; file.endsWith('.js'));
  for (const file of commandFiles) {
   const command = require(`./commands/${file}`);
   client.commands.set(command.name, command);
  }
  // END OF CONSTANTS
  
  const ServerInfo = new Discord.MessageEmbed()
   .setColor('RANDOM')
   .setTitle(`Server infomation on ${guild.name}`)
   .setDescription(`Command executed by ${message.author.tag}`)
   .addFields(
    { name: 'Members', value: `${guild.memberCount}` },
    { name: 'Region', value: `${guild.region}` },
    { name: 'Owner', value: `${guild.owner.tag}`, inline: true },
    { name: 'Created', value: `${guild.createdAt}`, inline: true }
   );
  
  client.on('ready', () =&gt; {
   console.log(`Logged in as ${client.user.tag}`);
  });
  
  client.on('message', (message) =&gt; {
   if (!message.content.startsWith(prefix) || message.author.bot) return;
  
   const args = message.content
    .slice(prefix.length)
    .trim()
    .split(/ +/);
   const command = args.shift().toLowerCase();
  
   if (!client.commands.has(command)) return;
  
   try {
    client.commands.get(command).execute(message, args);
    console.log(`Executing Command`, `${prefix}${command}`);
   } catch (error) {
    console.error(error);
    message.reply('there was an error trying to execute that command!');
   }
  });
  
  client.login(token);
  </code></pre>