Clears all keys using the current prefix, or the current prefix and the additional prefix if supplied.
the prefix to limit clearing to
Gets the specified key from the storage, if the key has not been set, returns the fallback. Note that though this is typed as the type of the fallback being returned, a deep comparison will not be used. You must validate your own objects.
the key to get
if the key was not set, this will be returned.
the stored value for the key.
Gets all storage keys available in the current storage object
Creates a new instance of this class with the current prefix and the additional prefix supplied.
Sets the specified key in the storage, overwriting any current data.
the key to set
the value to set in the storage.
Utility method to use and automatically save a key
the key use when getting and setting the value
the fallback if the key doesn't exist
the function to be called with the data, if the callback returns null or undefined, it is assumed that the value has been mutated and will be saved.
Generated using TypeDoc
The storage class used by the MessageBot class and all MessageBotExtension instances.