Values a script keeps between sessions. Each script has its own storage, kept in scripts\data\<script name>.json and saved about a second after a change.
Function
What it does
storage.get(key, default)
Returns the stored value, or default when there is none.
storage.set(key, value)
Stores a number, string, boolean or table. A nil value removes the key.
Requests run in the background. When the answer comes, your function gets fn(status, body, err): the HTTP status code, the answer’s text, and err, which is nil unless the request failed.
Function
What it does
http.get(url, fn)
Sends a GET request.
http.post(url, body, contentType, fn)
Sends a POST request. A table body is sent as JSON. contentType can be left out, http.post(url, body, fn), and is then text/plain.
http.webhook(url, text, fn)
Posts text as a message to a Discord webhook (its first 1900 characters). fn can be left out.
Links must start with http:// or https://.
A script can have 4 requests waiting for an answer at once, and all scripts together 16. Starting one more is an error.
An answer can be up to 1 MB.
A request gives up when the server does not answer within about 10 seconds.