title: "cannot read property "id" of null node js
body: <p>i am trying to convert my old discord bot from node js 6.x.x to 8.x.x, i am also putting the commands in a separate folder to make it look cleaner, the command works on my old bot but not with this bot, i get </p>
  
  <blockquote>
    <p>UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: Cannot read property 'id' of null</p>
  </blockquote>
  
  <p>UPDATED CODE STILL RETURNS THE SAME:</p>
  
  <pre><code>var settings = '../settingsConfig/settings.json';
  var file = require(settings)
  const SteamTotp = require('steam-totp');
  const Discord = require('discord.js');
  const configS = require('../settingsConfig/ConfigSammy.json');
  const configJ = require('../settingsConfig/ConfigJack.json');
  const configB = require('../settingsConfig/ConfigBen.json');
  
  module.exports.run = async (bot, message, args) =&gt; {
  function myFunc(){
      var JackCode = SteamTotp.getAuthCode(configJ.sharedSecret);
      var BenCode = SteamTotp.getAuthCode(configB.sharedSecret);
      var SammyCode = SteamTotp.getAuthCode(configS.sharedSecret);
  
      var codess = new Discord.RichEmbed()
          .addField("__**Bens Code:**__", BenCode)
          .addField("__**Jacks Code:**__", JackCode)
          .addField("__**Sammys Code:**__", SammyCode)
          .setColor(0x00FF00)
          message.author.send(codess)
  }
  new myFunc();
  };
  
  module.exports.help = {
      name: "codes"
  }
  </code></pre>