mirror of
https://github.com/AstrBotDevs/AstrBot
synced 2026-07-16 01:40:15 +08:00
refactor: update put_kv_data and get_kv_data methods in Context class to accept dictionary values
This commit is contained in:
@@ -122,7 +122,7 @@ class Context(ABC):
|
||||
async def put_kv_data(
|
||||
self,
|
||||
key: str,
|
||||
value: str,
|
||||
value: dict,
|
||||
) -> None:
|
||||
"""Insert a key-value pair data. The data will permanently stored in AstrBot unless user explicitly deleted.
|
||||
|
||||
@@ -132,7 +132,7 @@ class Context(ABC):
|
||||
"""
|
||||
...
|
||||
|
||||
async def get_kv_data(self, key: str) -> str | None:
|
||||
async def get_kv_data(self, key: str) -> dict | None:
|
||||
"""Get a value by key from the key-value store.
|
||||
|
||||
Args:
|
||||
|
||||
Reference in New Issue
Block a user