misc(deploy): changed filter to check for _cmd.js instead of .js

This commit is contained in:
Seaswimmer 2023-08-22 23:55:06 -04:00
parent ec98d2a5ec
commit 17d1cef6e1
No known key found for this signature in database
GPG key ID: 5019678FD9CF50D8

View file

@ -11,7 +11,7 @@ const commandFolders = fs.readdirSync(foldersPath);
for (const folder of commandFolders) { for (const folder of commandFolders) {
// Grab all the command files from the commands directory you created earlier // Grab all the command files from the commands directory you created earlier
const commandsPath = path.join(foldersPath, folder); const commandsPath = path.join(foldersPath, folder);
const commandFiles = fs.readdirSync(commandsPath).filter(file => file.endsWith('.js')); const commandFiles = fs.readdirSync(commandsPath).filter(file => file.endsWith('_cmd.js'));
// Grab the SlashCommandBuilder#toJSON() output of each command's data for deployment // Grab the SlashCommandBuilder#toJSON() output of each command's data for deployment
for (const file of commandFiles) { for (const file of commandFiles) {
const filePath = path.join(commandsPath, file); const filePath = path.join(commandsPath, file);