> For the complete documentation index, see [llms.txt](https://dbd-ts.gitbook.io/dbdts/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dbd-ts.gitbook.io/dbdts/functions/getcooldowntime.md).

# $getCooldownTime

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

### Usage

```php
$getCooldownTime[commandName;id]
```

This function has two params.

| Param       | Description                                                                        | Type      | Required |
| ----------- | ---------------------------------------------------------------------------------- | --------- | -------- |
| commandName | The command to get the cooldown from.                                              | String    | Yes      |
| id          | The same thing you provided for 'id' in [$cooldown](/dbdts/functions/cooldown.md). | Snowflake | Yes      |

{% hint style="info" %}
\`$getCooldownTime\` returns \`0\` if there is no cooldown active for the provided \`commandName\` on \`id\`.
{% endhint %}

### Example

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