Removed unneeded const
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user