F
onAction
Runs a listener for each Flux action of one type, after Discord's stores handle it.
function onAction<K extends FluxActionType>(type: K, listener: FluxActionListener<K>): () => voidParameters
| Name | Type | Description |
|---|---|---|
| type | K | The action type, like |
| listener | FluxActionListener<K> | Runs with each action. An error it throws is logged. |
Returns
() => voidA function that removes the listener.