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-");
    if (fs.existsSync(`./${fileName}`)) {
        fileName = generateFileName(ending);
    }
    client.database.eventScheduler.schedule("deleteFile", (new Date().getTime() + 60 * 1000).toString(), {
        fileName: `${fileName}.${ending}`
    });
    return path.join(__dirname, fileName + "." + ending);
}
