refactor: ♻️ Fix code smell

This commit is contained in:
Axel Olausson Holtenäs 2022-12-13 15:05:52 +01:00
parent e2eeec8b97
commit 7136a5bd99

View file

@ -11,6 +11,7 @@ export const start = async (client: Client) => {
const jobNames = await checkDirectory("schedules");
if (!jobNames) return logger.warn("⏰ No available jobs found");
return await Promise.all(
jobNames.map(async (jobName) => {
const job: IJob = await import(`../../schedules/${jobName}`);
@ -18,5 +19,6 @@ export const start = async (client: Client) => {
logger.verbose(`⏰ Performed the job "${jobName}"`);
await job.execute(client);
});
});
})
);
};