Abstract
Counts the number of entries in a bucket (optionally filtering by pattern).
Optional
keyPattern: stringOptional key pattern to filter by
%
: A percent sign (%) matches any sequence of zero or more characters._
: An underscore (_) matches any single character.To match _ and % as literals escape them with backslash (\_
and \%
).
Number of entries
Deletes all entries (optionally filtering by pattern) permanently.
Optional
keyPattern: stringOptional key pattern to filter by
%
: A percent sign (%) matches any sequence of zero or more characters._
: An underscore (_) matches any single character.To match _ and % as literals escape them with backslash (\_
and \%
).
Number of deleted entries
Store a value at the provided key in the bucket, this will overwrite the previous value stored there, if any.
The key that you're storing the value in
The value you're storing, for objects this will be converted to json behind the scenes
Optional
options: SetValueOptionsOptional options
The storage entry
Similar to set but stores the value conditionally.
The key where you're storing the value
The value you're storing, for objects this will be converted to json behind the scenes
The condition that has to pass to store the value.
Optional
options: SetValueOptionsOptional options
Either the new entry, or undefined if the condition failed.
Generated using TypeDoc
A Bucket provides persistent storage to botloader, using this you can store data and have it persist across vm reloads and bot restarts.
Buckets are namespaces, A Bucket with the name
a
holds different values from another Bucket with the nameb
even though the keys might be the same.Remark
this bucket should be registered with your script or plugin (example:
script.registerStorageBucket(...)
).