Fix the recursve generateFileName async function
diff --git a/src/utils/temp/generateFileName.ts b/src/utils/temp/generateFileName.ts
index b95b347..8feefbb 100644
--- a/src/utils/temp/generateFileName.ts
+++ b/src/utils/temp/generateFileName.ts
@@ -10,7 +10,7 @@
let fileName = crypto.randomBytes(35).toString("hex");
fileName = fileName.replace(/([a-zA-Z0-9]{8})/g, "$1-");
if (fs.existsSync(`./${fileName}`)) {
- fileName = generateFileName(ending);
+ fileName = await generateFileName(ending);
}
await client.database.eventScheduler.schedule("deleteFile", (Date.now() + 60 * 1000).toString(), {
fileName: `${fileName}.${ending}`