CooldownVerdict
interface in meocord/common Since 4.1.0
interface CooldownVerdictWhether a call may run, and if not, how long until one may.
Members
allowed
allowed: booleanWhether the call may run.
retryAfterMs
retryAfterMs: number0 when allowed; otherwise how long until the oldest call in the window leaves it.
retryTimestamp
retryTimestamp?: numberWith a refusal, when the next call is allowed, as a Unix timestamp in milliseconds on the store's own clock. Every
refusal in one wait gives the same one, so messages.dmOnCooldown tells one wait from the next by it, across
processes and however late the answer arrives. The built-in stores give it; a store without it is told apart by
retryAfterMs and the bot's clock instead.