# Cooldowns

Adding a cooldown to a command prevents players from spamming it, limiting them to one use per specified timespan. This is perfect for commands that should be regulated or only accessible every so often.

A command has four properties to do with cooldowns:

* `cooldown: %timespan%`: the cooldown duration&#x20;
* `cooldown message: %string%`: the message to be sent when the command is still on cooldown
  * the `remaining time` and `elapsed time` expressions can be used here to represent how much longer a player must wait, or how long they have waited
* `cooldown storage: %variable%`: a variable to store (longer) cooldowns in should the server go offline (cooldowns are kept in the server's memory and lost over a restart)
* `cooldown bypass: %permission node%`: a permission to let executors ignore the cooldown

Example:

{% code overflow="wrap" lineNumbers="true" %}

```python
command day:
  cooldown: 25 minutes
  cooldown message: You have waited only %elapsed time%, please wait %remaining time% before using this command again!
  cooldown storage: {cooldown::%executor's UUID%::dayCommand}
  cooldown bypass: skript.admin
  trigger:
    set time of (executor's world) to 06:00
```

{% endcode %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://x8ight.gitbook.io/syntask/fundamentals/structures/commands/cooldowns.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
