ODCounterCooldown class
We are still working the API Reference! This page might be incomplete or doesn't contain all details!
Overview
This is an Open Ticket counter cooldown.
It is is a cooldown based on a counter. When the number exceeds the limit, the cooldown is activated. The number will automatically be decreased with a set amount & interval.
Properties
activeLimit
number ➜ number
The cooldown will activate when exceeding this limit.
cancelLimit
number ➜ number
The cooldown will deactivate when below this limit.
inherited data
class ➜ api.ODManager
(no description)
decrement
number ➜ number
The amount to decrease the counter over time.
inherited id
class ➜ api.ODId
The id of this data.
increment
number ➜ number
The amount to increase the counter with everytime the cooldown is triggered/updated.
invervalMs
number ➜ number
The interval between decrements in milliseconds.
inherited ready
boolean ➜ boolean
Is this cooldown already initialized?
Methods
constructor()
function ➜ api.ODCounterCooldown
(no description)
View Parameters (6)
id
: type ➜api.ODValidId
- Parameter Description Lorem Ipsum.activeLimit
: number ➜number
- Parameter Description Lorem Ipsum.cancelLimit
: number ➜number
- Parameter Description Lorem Ipsum.increment
: number ➜number
- Parameter Description Lorem Ipsum.decrement
: number ➜number
- Parameter Description Lorem Ipsum.intervalMs
: number ➜number
- Parameter Description Lorem Ipsum.
inherited protected _change()
function ➜ void
Trigger an onChange()
event in the parent ODManager
of this class.
inherited changed()
function ➜ void
(❌ SYSTEM ONLY!!) Set the callback executed when a value inside this class changes.
check()
function ➜ boolean
Check this id without starting or updating the cooldown. Returns true
when on cooldown!
View Parameters (1)
id
: string ➜string
- Parameter Description Lorem Ipsum.
delete()
function ➜ void
Remove the cooldown for an id when available.
View Parameters (1)
id
: string ➜string
- Parameter Description Lorem Ipsum.
init()
function ➜ Promise
Initialize the internal systems of this cooldown.
use()
function ➜ boolean
Check this id and start cooldown when it exeeds the limit! Returns true
when on cooldown!
View Parameters (1)
id
: string ➜string
- Parameter Description Lorem Ipsum.
Defaults
We're still working on this part of the documentation!
Examples
We're still working on this part of the documentation!