Filter
Constructor
options
Options for an antispam filter.
Methods
.setTime(time)
Set the amount of time in ms.
time
number
The amount of time in ms.
returns object
.setMax(threshold)
Set the threshold of inputs allowed.
threshold
number
The threshold of inputs per ID allowed.
returns object
.setOnGood(onGood)
Set the function of what to do on an input that is not considered spam.
onGood
function
The function used on an input that is not considered spam.
returns object
.setOnBad(onBad)
Set the function of what to on an input that is considered spam.
onBad
function
The function used on an input that is considered spam.
returns object
.check(id)
Adds a use to a user by ID and acts upon it depending on if it is considered spam or not.
id
string
A string that identifes a user.
returns function
.clear(id)
Clears all uses from a user by ID.
id
string
A string that identifes a user.
returns void
.has(id)
Checks if a user is spamming by ID.
id
string
A string that identifes a user.
returns function
.list()
Gets the list of IDs put into the filter.
returns array
Last updated