General Updates

This commit is contained in:
Ahmad 2024-03-03 17:43:26 -05:00
parent a67829c6f1
commit cdb82b771e
No known key found for this signature in database
GPG key ID: 8FD8A93530D182BF
10 changed files with 161 additions and 129 deletions

View file

@ -15,7 +15,6 @@ export const deployCommands = async () => {
try {
console.log(`Started refreshing ${commandFiles.length} application (/) commands.`);
// Prepare the commands array
const commands = commandFiles.map(async (file) => {
const filePath = path.join('file://', commandsPath, file);
const commandModule = await import(filePath);
@ -29,10 +28,8 @@ export const deployCommands = async () => {
}
});
// Filter out any null values from the commands array
const validCommands = await Promise.all(commands.filter(command => command !== null));
// Use the provided way of registering commands
const data: any = await rest.put(
Routes.applicationGuildCommands(clientId, guildId),
{ body: validCommands },