Creates a new instance of JsonFilePersistence.
Configuration options specifying file path.
Deletes chat data for the given chat ID.
Telegram chat ID.
Deletes state for a conversation key.
Conversation identifier.
Deletes user data for the given user ID.
Telegram user ID.
Flushes any pending disk updates.
Retrieves global bot data.
Key-value map of bot data.
Retrieves chat data for the given chat ID.
Telegram chat ID.
Key-value map of chat data.
Retrieves all active conversation states.
Map of conversation keys to states.
Retrieves user data for the given user ID.
Telegram user ID.
Key-value map of user data.
Stores global bot data.
Key-value map to store.
Resolves when saved.
Stores chat data for the given chat ID.
Telegram chat ID.
Key-value map to store.
Resolves when saved.
Overwrites persisted jobs.
List of persisted jobs.
Resolves when saved.
Stores user data for the given user ID.
Telegram user ID.
Key-value map to store.
Resolves when saved.
Updates state for a conversation key.
Conversation identifier.
Current step/state.
Resolves when saved.
Persists user data, chat data, bot data, conversation states, and jobs to a single JSON file.
Example