Skip to content
GitHub

CooldownBatchVerdict

interface in meocord/common Since 4.1.0

interface CooldownBatchVerdict extends CooldownVerdict

Whether a call may run against every cooldown it counts against, and if not, which refused it.

Members

blocked

blocked?: number

The index of the entry that refused the call; with several, the one with the longest wait.

release

release?: () => Promise<void>

Undoes the call this verdict recorded, on a store that can. @Cooldown calls it for a call it has already refused because the store answered after cooldownStoreTimeoutMs, so a refused call costs no use. Absent on a refusal. The built-in stores give it as a non-enumerable property, so a verdict compares and serialises as its data. A store without it keeps such a call counted.