OcelotBOT
  • Introduction
  • Custom Commands
    • Message Object
    • Discord module
      • Command Settings
    • HTTP Module
    • JSON Module
    • Store Module
    • Built-in Modules
  • Tutorials
    • Making a simple custom command
Powered by GitBook
On this page
  • set(key: string, value: any)
  • get(key: string)

Was this helpful?

  1. Custom Commands

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

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

get(key: string)

Returns a string value stored at key

local store = require('store');
return store.get("myVariable");
PreviousJSON ModuleNextBuilt-in Modules

Last updated 4 years ago

Was this helpful?