title: Discord.js TypeError: Cannot read property 'id' of undefined
body: <p>The error happens at <code>if(serversInfo[user.guild.id].modlog_enabled</code></p>
  
  <p>Also, <code>let serversInfo = JSON.parse(fs.readFileSync('./data/servers.json', 'utf8'));
  </code> if that helps.</p>
  
  <pre><code>client.on('guildBanAdd', user =&gt; {
    if (serversInfo[user.guild.id].modlog_enabled == true &amp;&amp; serversInfo[user.guild.id].modlog_channel !== null) {
      var d = Date.now()
      d = new Date(d)
      d = d.getMonth() + 1 + '/' + d.getDate() + '/' + 
        d.getFullYear() + ' ' + 
        (d.getHours() &gt; 12 ? d.getHours() - 12 : d.getHours()) + ':' + d.getMinutes() + ' ' + (d.getHours() &gt;= 12 ? 'PM' : 'AM')
  
      client.channels
        .get(serversInfo[user.guild.id].modlog_channel)
        .send(`${user}**//**${user.id} was banned on **${d}**.`)
  
    } else if (err) {
      console.log(err)
    }
  })
  </code></pre>
  
  <p>I have tried to use just <code>guild.id</code> but that didn't seem to work as I would get an error of <code>guild is not defined</code>. <code>modlog_enabled</code> has been set to true in the .json file but it doesn't see it. My other events work fine when checking <code>modlog_enabled</code>.</p>