Cooldown
The Cooldown check acts as a rate limiter, preventing a flow from executing too frequently. When data passes through the Cooldown node, it checks whether enough time has elapsed since the last execution. If the cooldown period has passed, the data continues down the "Pass" path. If not, it is routed to the "Blocked" path.
This is essential for preventing spam and abuse. Without a cooldown, a viewer could repeatedly trigger a command or alert and flood your stream. The cooldown ensures that no matter how many times the trigger fires, the downstream effects only run at the rate you allow.
Inputs
| Name | Type | Description |
|---|---|---|
any | any | Any input data. The cooldown does not inspect the data -- it only checks timing. |
Outputs
| Name | Type | Description |
|---|---|---|
Pass | pass-through | The input data, forwarded if the cooldown period has elapsed. |
Blocked | pass-through | The input data, forwarded if the cooldown period has not yet elapsed. |
Configuration
- Duration: The cooldown period in seconds. After the flow passes through once, subsequent activations within this window will be routed to the Blocked output.
Example
Add a Cooldown node after a Chat Command trigger for a !joke command with a duration of 30 seconds. The first viewer to use the command will get a joke, but anyone who tries again within 30 seconds will be blocked. You can optionally connect the Blocked output to a chat message saying "This command is on cooldown!"