Still got errors and warnings, mostly the same and easy to fix
diff --git a/src/utils/temp/generateFileName.ts b/src/utils/temp/generateFileName.ts
index f9662ad..8a219b7 100644
--- a/src/utils/temp/generateFileName.ts
+++ b/src/utils/temp/generateFileName.ts
@@ -1,17 +1,17 @@
-import * as fs from 'fs';
-import * as crypto from 'crypto';
-import client from '../client.js';
-import * as path from 'path'
-import {fileURLToPath} from 'url';
+import * as fs from "fs";
+import * as crypto from "crypto";
+import client from "../client.js";
+import * as path from "path";
+import {fileURLToPath} from "url";
const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
export default function generateFileName(ending: string): string {
- let fileName = crypto.randomBytes(35).toString('hex');
- fileName = fileName.replace(/([a-zA-Z0-9]{8})/g, '$1-');
+ let fileName = crypto.randomBytes(35).toString("hex");
+ fileName = fileName.replace(/([a-zA-Z0-9]{8})/g, "$1-");
if (fs.existsSync(`./${fileName}`)) {
fileName = generateFileName(ending);
}
client.database.eventScheduler.schedule("deleteFile", new Date().getTime() + (60 * 1000), {fileName: `${fileName}.${ending}`});
- return path.join(__dirname, fileName + '.' + ending);
+ return path.join(__dirname, fileName + "." + ending);
}