title: SlashCommands not showing up
body: <p>I just finished my bot and wanted to invite it to another server to test it out.</p>
  <p>However, when I typed / no commands showed up.</p>
  <p>When I invited the bot I enabled application.commands so I can use the slashcommands but it still did not work. My bot also has a global slashcommand handler so it should normally work right?</p>
  <p>I don't know if the handler code is needed but I'll still add it here in case you do need it:</p>
  <pre class="lang-js prettyprint-override"><code>const { Perms } = require('../Validation/Permissions');
  const { Client } = require('discord.js');
  
  /**
   * @param {Client} client
   */
  
  module.exports = async (client, PG, Ascii) =&gt; {
      const Table = new Ascii(&quot;Command Loaded&quot;);
  
      CommandsArray = [];
  
      (await PG(`${process.cwd()}/Commands/*/*.js`)).map(async (file) =&gt; {
          const command = require(file);
  
          if(!command.name)
          return Table.addRow(file.split(&quot;/&quot;)[7], &quot;⛔ FAILED&quot;, &quot;Missing a name.&quot;)
  
          if(command.type !== &quot;USER&quot; &amp;&amp; !command.description)
          return Table.addRow(command.name, &quot;⛔ FAILED&quot;, &quot;Missing a description.&quot;)
  
          if(command.permission){
              if(Perms.includes(command.permission))
              command.defaultPermission = false;
              else
              return Table.addRow(command.name, &quot;⛔ FAILED&quot;, &quot;Permission is invalid.&quot;)
          }
  
          client.commands.set(command.name, command);
          CommandsArray.push(command);
  
          await Table.addRow(command.name, &quot;✅ SUCCESSFUL&quot;);
      });
  
      
  
      console.log(Table.toString());
  
      // PERMISSIONS CHECK //
  
      client.on(&quot;ready&quot;, async () =&gt;{
          client.guilds.cache.forEach((g) =&gt; {
              g.commands.set(CommandsArray).then(async (command) =&gt;{
                  const Roles = (commandName) =&gt; {
                      const cmdPerms = CommandsArray.find((c) =&gt; c.name === commandName).permission;
                  if(!cmdPerms) return null;
      
                  return g.roles.cache.filter((r) =&gt; r.permissions.has(cmdPerms) &amp;&amp; !r.managed).first(10);
                  }
      
                  const fullPermissions = command.reduce((accumulator, r) =&gt;{ 
                      const roles = Roles(r.name);
                      if(!roles) return accumulator;
      
                      const permissions = roles.reduce((a, r) =&gt;{
                          return [...a, {id: r.id, type: &quot;ROLE&quot;, permission:true}]
                      }, []);
      
                      return [...accumulator, {id: r.id, permissions}]
                  }, []);
      
                  await g.commands.permissions.set({ fullPermissions });
      
              });
          })
          });
  }
  </code></pre>