Delete state from the storage
Key of the state, as defined by StateKeyDelegate
Get information about a rate limit.
It is recommended that you use sliding window or leaky bucket to implement rate limiting (learn more),
Key of the rate limit
Current unix time in ms
Maximum number of requests in window
Window size in seconds
Tuple containing the number of remaining and unix time in ms when the user can try again
Retrieve state from the storage
If state is not found or has expired, return null
Key of the state, as defined by StateKeyDelegate
Reset a rate limit.
Key of the rate limit
Save state to the storage
Key of the state, as defined by StateKeyDelegate
String representing the state
Optional
ttl: numberTTL for the state, in seconds
Clean up expired states and rate limits.
Current unix time in ms
Interface for FSM storage for the dispatcher.
All of the officially supported storages already implement this interface, so you can just re-use it.
Current scene is a special case of a
string
state, Most of the time you can just store it the same way as normal state, prefixing with something like$current_state_
(scene name can't start with$
). Alternatively, you can store them as simple strings