Skip to content

Commit

Permalink
So?
Browse files Browse the repository at this point in the history
Signed-off-by: David <[email protected]>
  • Loading branch information
DavidCraftDev committed Oct 12, 2023
1 parent 34ff7ef commit dfcec45
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions command-deployment.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,9 @@ const path = require('node:path');

const commands = [];
// Grab all the command files from the commands directory you created earlier
const foldersPath = path.join(__dirname, 'commands');
const commandFolders = fs.readdirSync(foldersPath);

for (const folder of commandFolders) {
// Grab all the command files from the commands directory you created earlier
const commandsPath = path.join(foldersPath, folder);
const commandFiles = fs.readdirSync(commandsPath).filter(file => file.endsWith('.js'));
const commandsPath = path.join(__dirname, 'commands');
const commandFiles = fs.readdirSync(commandsPath).filter(file => file.endsWith('.js'));
// Grab the SlashCommandBuilder#toJSON() output of each command's data for deployment
for (const file of commandFiles) {
const filePath = path.join(commandsPath, file);
Expand All @@ -22,7 +18,6 @@ for (const folder of commandFolders) {
console.log(`[WARNING] The command at ${filePath} is missing a required "data" or "execute" property.`);
}
}
}

// Construct and prepare an instance of the REST module
const rest = new REST().setToken(token);
Expand Down

0 comments on commit dfcec45

Please sign in to comment.