Removed unneeded const

This commit is contained in:
2025-01-03 15:24:01 +01:00
parent 375eb7c3f7
commit 02d7178fa2
7 changed files with 7 additions and 14 deletions

View File

@@ -3,10 +3,9 @@ import fs from "fs"
import path from "path"
import { ICron } from "~/interfaces"
type FileType = "js" | "ts"
const __dirname = import.meta.dirname
export default async function loadCronEvents(ft: FileType) {
const cronPath = path.join(__dirname, "..", "..", "events", "cron")
const cronPath = path.join(import.meta.dirname, "..", "..", "events", "cron")
const cronFiles = fs.readdirSync(cronPath).filter(file => file.endsWith(ft))
for (const file of cronFiles) {