F

findLazy

Resolves a module matching filter once it loads, without ever loading it.

function findLazy(filter: MetroFilter, options?: MetroLazySearchOptions): any

Parameters

NameTypeDescription
filterMetroFilter

The filter to match against.

options?MetroLazySearchOptions

Whether to also match the default export, as in onModuleLoaded, plus a signal that abandons the wait.

Returns

any

The loaded module, or a promise of the module once Discord loads it, or of undefined if signal aborts first or a full search of this Discord build found the module missing.