# Variable Category

Variables are important tools in creating a useful Discord bot. Variables in Discord Bot Studio can be leveraged in a similar way to traditional programming. Use the nodes in this category to interact with variables. You can also insert a variable value into most fields using the **Insert Variable** button next to the field.

There are three types of variables: temporary, server, and global.&#x20;

**Temporary** variables are stored for the duration that the bot is running. They are not saved to file and will be deleted when the bot goes offline. They are per-server.&#x20;

**Server** variables operate exactly like temporary variables, but they are saved to file and thus persist even if the bot is restarted.&#x20;

**Global** variables are also saved to file and are persistent. They differ from server variables because they are not specific to a certain server; i.e. they can be used by the bot across all servers that it's in.

{% content-ref url="variable-category/store-value-in-variable" %}
[store-value-in-variable](https://docs.discordbotstudio.org/response-nodes/variable-category/store-value-in-variable)
{% endcontent-ref %}

{% content-ref url="variable-category/edit-variable" %}
[edit-variable](https://docs.discordbotstudio.org/response-nodes/variable-category/edit-variable)
{% endcontent-ref %}

{% content-ref url="variable-category/check-variable-value" %}
[check-variable-value](https://docs.discordbotstudio.org/response-nodes/variable-category/check-variable-value)
{% endcontent-ref %}

{% content-ref url="variable-category/check-if-variable-exists" %}
[check-if-variable-exists](https://docs.discordbotstudio.org/response-nodes/variable-category/check-if-variable-exists)
{% endcontent-ref %}

{% content-ref url="variable-category/generate-random-number" %}
[generate-random-number](https://docs.discordbotstudio.org/response-nodes/variable-category/generate-random-number)
{% endcontent-ref %}

{% content-ref url="variable-category/get-mentioned-user" %}
[get-mentioned-user](https://docs.discordbotstudio.org/response-nodes/variable-category/get-mentioned-user)
{% endcontent-ref %}


---

# 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://docs.discordbotstudio.org/response-nodes/variable-category.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.
