In-memory storage implementation for development and testing.
Thread-safe for concurrent access within a single process. Data is lost when the process exits.
const storage = new MemoryStorage()bot.useState(storage) Copy
const storage = new MemoryStorage()bot.useState(storage)
Read items from memory.
Keys to read.
Dictionary of key-value pairs that exist in storage.
Write items to memory.
Dictionary of key-value pairs to write.
Delete items from memory.
Keys to delete.
In-memory storage implementation for development and testing.
Thread-safe for concurrent access within a single process. Data is lost when the process exits.
Example