$getCooldownTime

Gets how much time is left on a cooldown, in milliseconds.

Usage

$getCooldownTime[commandName;id]

This function has two params.

ParamDescriptionTypeRequired

commandName

The command to get the cooldown from.

String

Yes

id

The same thing you provided for 'id' in $cooldown.

Snowflake

Yes

`$getCooldownTime` returns `0` if there is no cooldown active for the provided `commandName` on `id`.

Example

bot.commands.add({
  type: "basicCommand",
  name: "example",
  code: `$getCooldownTime[someCommandName;$authorID]` //Returns how much time is left on 'someCommandName' cooldown in milliseconds
  })

Last updated