F
interceptAction
Runs an interceptor before Discord handles each Flux action of one type. It may change the action, or drop it by returning true.
function interceptAction<K extends FluxActionType>(type: K, interceptor: FluxActionInterceptor<K>): () => voidParameters
| Name | Type | Description |
|---|---|---|
| type | K | The action type, like |
| interceptor | FluxActionInterceptor<K> | Runs with each action. An error it throws is logged and the action goes on. |
Returns
() => voidA function that removes the interceptor.