MCPcopy Create free account
hub / github.com/Botloader/botloader / createStorageVarJson

Method createStorageVarJson

components/runtime/src/ts/script.ts:161–164  ·  view source on GitHub ↗

* Create a new persistent variable. * * This is built on top of storage buckets so you can think of it as a single entry inside a storage bucket. * * @param key Key for the variable inside the storage bucket, the same key in another script will refer to the same entry * @p

(key: string, options?: StorageVarExtraOptions)

Source from the content-addressed store, hash-verified

159 * @returns
160 */
161 createStorageVarJson<T>(key: string, options?: StorageVarExtraOptions) {
162 const namespace = options?.namespace ?? "bl:vars_json";
163 return new Storage.JsonVar<T>(namespace, key, this.storagePluginId());
164 }
165
166 /**
167 * Create a new persistent variable.

Callers 9

roles.tsFile · 0.80
threads_events.tsFile · 0.80
welcome.tsFile · 0.80
automod.tsFile · 0.80
starboard.tsFile · 0.80
automod_3.tsFile · 0.80
starboard_3.tsFile · 0.80
starboard_2.tsFile · 0.80
automod_2.tsFile · 0.80

Calls 1

storagePluginIdMethod · 0.95

Tested by

no test coverage detected