Functionutils/nodev0.8.11traverseDirectoryRecursively traverses through a directory, importing all .ts and .js files and applying a callback to each import. Throws:A SeedcordError when a directory cannot be read or a file throws while importing. async traverseDirectory( dir: string, callback: ( fullPath: string, relativePath: string, imported: Record<string, unknown> ) => Promise<void> | void ): Promise<void>ExamplesCopyawait traverseDirectory('./commands', (fullPath, relativePath, imported) => { for (const exported of Object.values(imported)) register(exported); });Paramsdirdir: stringcallbackcallback: (fullPath: string, relativePath: string, imported: Record<string, unknown>) => Promise<void> | void
callbackcallback: (fullPath: string, relativePath: string, imported: Record<string, unknown>) => Promise<void> | void