# Store Module

The store module lets you store and retrieve values on a per-server basis. Values can be set/retrieved by any custom function in that server, regardless of who made it or who executes the function. Key and value length are limited to 191 characters.

## set(key: string, value: any)

Set a value, non-string values will be converted to a string

```lua
local store = require('store');
store.set("myVariable", "value");
return "Value set!";
```

## get(key: string)

Returns a string value stored at `key`

```lua
local store = require('store');
return store.get("myVariable");
```


---

# 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.ocelotbot.xyz/custom-commands/store-module.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.
