Skip to content

$globalCooldown

$globalCooldown will set a global-based cooldown for a command.

Usage

$globalCooldown[time;errorMessage]
  • You are able to retrieve the remaining cooldown in the $globalCooldown 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 given when there’s remaining time of the cooldown.true

Example(s)

This will return Hello and stop anyone from executing the command again for another five minutes:

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