@antiraid-ext/limiter
API reference for @antiraid-ext/limiter
@antiraid-ext/limiter
Types
LockdownActionLimiter
Raw Type
type LockdownActionLimiter = {
--- Attempts an action, if the limit is reached, it will sleep for a penalty time
attempt: () -> ()
}
Prop | Type | Description |
---|---|---|
attempt | () -> () | Attempts an action, if the limit is reached, it will sleep for a penalty time |
Functions
ActionLimiter
Limits to N attempted actions per time period.
After said time period, the limiter will auto sleep the thread for PENALTY times the time period.
Because of this, the limiter is a 'slowdown' mechanism, not a 'rate' limiter.
Function Signature
--- Limits to N attempted actions per time period.
---
--- After said time period, the limiter will auto sleep the thread for PENALTY times the time period.
---
--- Because of this, the limiter is a 'slowdown' mechanism, not a 'rate' limiter.
function ActionLimiter(allowed: number, timePeriod: number, penalty_multiplier_val: number?, store_multiplier_val: number?) -> LockdownActionLimiter end
Arguments
allowed
timePeriod
penalty_multiplier_val
This field is optional and may not be specified
store_multiplier_val
This field is optional and may not be specified
Returns
ret1
Last updated on