Skip to main content
Plugins get persistent key-value storage that survives proxy restarts. Data is stored as JSON in:
Use it for settings, caches, or any JSON-serializable state.

API

  • get<T>(key) - Returns the value or undefined. Use a type parameter for TypeScript: get<boolean>('enabled').
  • set(key, value) - Stores the value. Must be JSON-serializable (primitives, plain objects, arrays). No functions or circular refs.
  • delete(key) - Removes the key. Returns true if the key existed.
  • has(key) - Returns whether the key exists.
  • getAll() - Returns a snapshot of all key-value pairs.
  • clear() - Removes all keys for this plugin.

Example: per-plugin settings

Example: opponent history (object)

Storage is per plugin: keys are namespaced by your plugin’s id. Other plugins cannot read or write your storage.