diff --git a/src/handlers/deployCommands/index.ts b/src/handlers/deployCommands/index.ts index da16d33..4b30c96 100644 --- a/src/handlers/deployCommands/index.ts +++ b/src/handlers/deployCommands/index.ts @@ -13,28 +13,28 @@ export default async (client: Client) => { logger.info("Gathering command list"); await Promise.all( - client.commands.map(async (commandData: ICommand) => { + client.commands.map((commandData: ICommand) => { commandList.push(commandData.builder.toJSON()); logger.verbose(`${commandData.builder.name} pushed to list`); }) ) - .then(async () => { + .then(() => { logger.info(`Finished gathering command list.`); }) - .catch(async (error) => { + .catch((error) => { throw new Error(`Could not gather command list: ${error}`); }); await client.application?.commands .set(commandList, process.env.DISCORD_GUILD_ID) - .then(async () => { + .then(() => { logger.info(`Finished updating command list.`); }); if (process.env.NODE_ENV !== "production") { await client.application?.commands .set(commandList) - .then(async () => logger.info(`Finished updating guild command list.`)); + .then(() => logger.info(`Finished updating guild command list.`)); } }; diff --git a/src/helpers/checkDirectory/index.ts b/src/helpers/checkDirectory/index.ts index 30fa6bc..de33ba1 100644 --- a/src/helpers/checkDirectory/index.ts +++ b/src/helpers/checkDirectory/index.ts @@ -2,6 +2,6 @@ import fs from "fs"; const fsPromises = fs.promises; export default async (path: string) => { - const result = fsPromises.readdir(path); + const result = await fsPromises.readdir(path); return result; };