F
onModuleLoaded
Calls onLoad with the module matching filter once it initializes, without ever initializing it.
A loaded module is passed at once; otherwise onLoad runs inside the module's factory, before its importer reads it.
A module a full search of this Discord build found missing never loads, so onLoad never runs for it; onMissing runs instead.
function onModuleLoaded(filter: MetroFilter, onLoad: (mdl: MetroExport) => void, waitOptions?: MetroWaitOptions): () => voidParameters
| Name | Type | Description |
|---|---|---|
| filter | MetroFilter | The filter to match against. |
| onLoad | (mdl: MetroExport) => void | Receives the matched module, once. |
| waitOptions? | MetroWaitOptions | Whether to also match the |
Returns
() => voidA function that stops waiting; it does nothing once onLoad has run.