maxValueBytes.
MiktingStore uses Node.js’s built-in node:sqlite. It also supports an
in-memory backend. The SQLite table is
kv(key, scope_type, scope_id, value_json, expires_at, updated_at).
Scopes
A scope separates values with the same key. The scope ID comes from the current event context.
For example,
coins in the user scope has a separate value for each user.
If the context lacks the requested scope ID, the store falls back to the
shared global scope. Supply a member context when storing per-user data.
Set, read, and update values
[[mikting_error]] to missing_key:<k>.
miktingStoreIncr updates values atomically on both backends and preserves
an existing TTL. Incrementing a nonnumeric value fails with
not_a_number:<k>.
The list operation matches key prefixes literally, including % and _,
and returns keys from the selected scope only. Setting key: '*' on
miktingStoreRemove clears that scope.
Storage configuration
driver: memory stores data in memory without writing to disk. If SQLite
cannot open the database file, the addon logs a warning and uses the memory
fallback. /mikting-status then shows memory(fallback).
For persistence on Pterodactyl, place store.db on a persistent volume.
Data in memory is lost when the bot restarts.
Converting meta actions
For new scripts, use the store actions. The following table maps commonmeta* operations to their store equivalents.
Inspect stored data with
/mikting-store get|list. The command truncates
values and redacts secrets.
Documentation home · Source Markdown