load

Loads a folder

public async load<T>(dir: string, callback?: (file: T, fileName: string) => Awaited<unknown>)

  • dir: directory to load

  • callback: function executed when a file is loaded, file corresponds to the loaded file and fileName corresponds to the name of that file

client.load("src/my-stuff", (file, fileName) => {
console.log("Loaded file " + fileName)
})

Last updated

Was this helpful?