F
findByFilePath
Finds a module by a segment of its file path. Lazy unless { lazy: false } is passed: the search runs on first access.
function findByFilePath<K extends MetroLookupFirst<MetroModulePath>, T extends MetroLookupArgs<string>>(first: K, ...rest: T): MetroModuleOrArray<[K, ...T[]], string>Finds a module by a segment of its file path. Lazy unless { lazy: false } is passed: the search runs on first access.
Parameters
| Name | Type | Description |
|---|---|---|
| first | K | The file path to search for. |
| ...rest | T | Options, or further bulk items. |
Returns
MetroModuleOrArray<[K, ...T[]], string>The matched module, typed from Discord's modules when the path is known.
function findByFilePath<T extends MetroLookupArgs<string>>(...args: T): MetroModuleOrArray<T, string>Finds a module by a segment of its file path. Lazy unless { lazy: false } is passed: the search runs on first access.
Parameters
| Name | Type | Description |
|---|---|---|
| ...args | T |
Returns
MetroModuleOrArray<T, string>The matched module, typed from Discord's modules when the path is known.