@discord-flow/store
v1.0.2
Published
State persistence stores for discord-flow
Maintainers
Readme
@discord-flow/store
State store for discord-flow. Manages user/guild state persistence.
Installation
npm install @discord-flow/storeUsage
import { createStore } from '@discord-flow/store';
const store = createStore();
// Get state
const state = await store.get('user:123');
// Set state
await store.set('user:123', { currentState: 'idle', data: {} });
// Delete state
await store.delete('user:123');API
createStore(options?)
Creates a new store instance.
store.get(key)
Gets the state for the given key.
store.set(key, value)
Sets the state for the given key.
store.delete(key)
Deletes the state for the given key.
License
MIT
