Skip to content

$tempCooldown

$tempCooldown will create a temporary cooldown for a command.

Usage

$tempCooldown[time;id;errorMessage?]
  • You are able to retrieve the remaining cooldown in the $tempCooldown 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
idstringCan be user, guild, message, channel or any other ID.true
errorMessagestringError message when there’s remaining time for the cooldown.true

Example(s)

This will set a temporary cooldown for a command which applies once only:

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