fix: structure imports on windows (#10835)

This commit is contained in:
Almeida
2025-04-13 20:45:11 +01:00
committed by GitHub
parent f0ea40586b
commit 5c0b714557
3 changed files with 6 additions and 6 deletions

View File

@@ -1,5 +1,5 @@
import { readdir, stat } from 'node:fs/promises';
import { fileURLToPath, URL } from 'node:url';
import { URL } from 'node:url';
import { predicate as commandPredicate } from '../commands/index.js';
import { predicate as eventPredicate } from '../events/index.js';
@@ -54,7 +54,7 @@ export async function loadStructures(dir, predicate, recursive = true) {
}
// Import the structure dynamically from the file
const structure = (await import(fileURLToPath(fileUrl))).default;
const structure = (await import(fileUrl.toString())).default;
// If the structure is a valid structure, add it
if (predicate(structure)) {