importFiles
Imports every .ts, .tsx, .mts, .js, .jsx or .mjs file under a directory, recursively and sorted by path, yielding each module in turn.
It skips type declarations, dotfiles, dot-folders and node_modules. A break stops the walk before the next import.
A relative dir resolves against root from seedcord.config.ts, whichever file calls this.
Throws:
A SeedcordError when the directory cannot be read.
A SeedcordError when a file throws while it imports.
A SeedcordError when
diris relative and the bot did not start throughseedcord devor its built output.A SeedcordError when the directory is outside
rootor has a dot-folder or node_modules in its path, underseedcord devor in a built bot.A SeedcordError when the directory was missing at build time, in a built bot.
importFiles(
dir: string
): AsyncGenerator<ImportedFile>dir
dir: string