Skip to content
Cooldown resetCooldown

$resetCooldown

$resetCooldown releases a cooldown previously claimed by $cooldown, $serverCooldown or $globalCooldown, for example when the rest of the script fails after the cooldown was taken. This function does not exist in BDFD.

Syntax

$resetCooldown[(normal|server|global)]

Parameters

Parameter Description
type Optional. normal (default, matches $cooldown), server (matches $serverCooldown) or global (matches $globalCooldown). Any other value raises “Cooldown type must be normal, server or global.”.

Return value

  • An empty string.

Examples

Give the cooldown back on failure

$cooldown[30s;Wait %time% before retrying.]
$if[$message[1]==]
  $resetCooldown
  Usage: !cmd value
$endif

Global cooldown

$resetCooldown[global]

Try it

Paste an example into the playground to preview its message (functions that act on Discord are not run), or build the same thing with blocks.