LogoAntiRaid

@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: () -> ()
}
PropTypeDescription
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

number

timePeriod

number

penalty_multiplier_val

This field is optional and may not be specified

number?

store_multiplier_val

This field is optional and may not be specified

number?

Returns

ret1

LockdownActionLimiter

Last updated on