text: const { readdirSync } = require('fs');
  
  module.exports  = (client) => {
      // Fetching the commands and having discord.js load them up
      readdirSync("./commands/").forEach(dir => {
          const commands = readdirSync(`./commands/${dir}/`).filter(file => file.endsWith('.js'));
          for(let file of commands) {
              let pull = require(`../commands/${dir}/${file}`);
              if(pull.name) {
                  client.commands.set(pull.name, pull);
              }
              if(pull.aliases && Array.isArray(pull.aliases)) {
                  pull.aliases.forEach(alias => client.aliases.set(alias, pull.name));
              }
          }
      })
  
  }