Skip to content

$cooldown

$cooldown will set a user-based cooldown.

Usage

$cooldown[time;errorMessage]
  • You are able to retrieve the remaining cooldown in the $cooldown function by using %time% or any of the following below.
    • %time% %year% %month% %week% %day% %hour% %min% %sec% %ms% %fullTime%

Parameters

FieldTypeDescriptionRequired
timestringThe duration of the cooldown.true
errorMessagestringError message when there’s remaining time for the cooldown.true

Example(s)

This will set a cooldown for a command which applies to the user only and returns the remaining cooldown:

1
client.command({
2
name: "cooldown",
3
code: `
4
hello
5
$cooldown[2m;Please wait %time% to execute this command again.]
6
`
7
});