title: Discord.JS Purge.js command issue
body: <p>Ok so my bot got rebuilt with a somewhat different code. </p>
  
  <p>I'm using a somewhat more simplified <code>fs</code> command and events handler. My command works as intended. </p>
  
  <p>But I'm wanting to add the amount pruned into the fields for the richEmbed and it keeps erroring out.</p>
  
  <p>Here is my <code>purge.js</code> file</p>
  
  <pre class="lang-js prettyprint-override"><code>const Discord = require('discord.js')
  
  
  module.exports = {
      name: 'purge',
      description: 'Purge up to 99 messages.',
      execute(message, args) {
          console.log("purging messages")
  
  
          const embed = new Discord.RichEmbed()
              .setTitle("Success")
              .setColor(0x00AE86)
              .setFooter("Guardian", "https://raw.githubusercontent.com/phantomdev-github/Resources/master/Discord%20Bots/Guardian/src/avatar.png")
              .setThumbnail("https://raw.githubusercontent.com/phantomdev-github/Resources/master/Discord%20Bots/Guardian/src/avatar.png")
              .setTimestamp()
              .setURL("https://github.com/phantomdev-github/Resources/tree/master/Discord%20Bots/Guardian")
              .addField("Bot Messages Purged", "missing code here", false)
              .addField("User Pins Purged", "missing code here", false)
              .addField("User Messages Purged", "missing code here", false)
              .addField("Total Messages Purged", "missing code here", false)
  
          message.channel.send({ embed });
  
          const amount = parseInt(args[0]) + 1;
  
          if (isNaN(amount)) {
              return message.reply('that doesn\'t seem to be a valid number.');
          } else if (amount &lt;= 1 || amount &gt; 100) {
              return message.reply('you need to input a number between 1 and 99.');
          }
  
          message.channel.bulkDelete(amount, true).catch(err =&gt; {
              console.error(err);
              message.channel.send('there was an error trying to prune messages in this channel!');
          });
      },
  };
  </code></pre>
  
  <p>If it helps this i my <code>index.js</code></p>
  
  <pre class="lang-js prettyprint-override"><code>const fs = require('fs');
  const Discord = require('discord.js');
  const client = new Discord.Client();
  const { token } = require('./token.json');
  
  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);
      console.log(file,command)
  }
  
  fs.readdir('./events/', (err, files) =&gt; {
      if (err) return console.error(err);
      files.forEach(file =&gt; {
          if(!file.endsWith('.js')) return;
          const eventFunction = require(`./events/${file}`);
          console.log(eventFunction)
          eventFunction.execute(client)
      });
  });
  
  client.login(token);
  </code></pre>
  
  <p>and this is my <code>message.js</code></p>
  
  <pre class="lang-js prettyprint-override"><code>const { prefix } = require('./prefix.json');
  
  module.exports = {
      name: 'message',
      description: '',
      execute:function(client) {
          client.on('message',message =&gt; {
      if (!message.content.startsWith(prefix) || message.author.bot) return;
  
      const args = message.content.slice(prefix.length).split(/ +/);
      const command = args.shift().toLowerCase();
          if (!client.commands.has(command)) return;
  
          try {
              client.commands.get(command).execute(message, args);
              } catch (error) {
                  console.error(error);
                  message.reply('there was an error trying to execute that command!');
                  }
  })
  
  }};
  </code></pre>
  
  <p>Basically I'm trying to figure out what to place into the <code>"missing code here"</code> sections. Also any way to lock it to people with Administrator permissions only would be useful as well. I attempted that but it failed to work with the embed.</p>