From a04d668cf6ca040bf6beb0db0b704c5209bac09a Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Thu, 27 Nov 2025 18:10:21 +0800 Subject: [PATCH] refactor: update put_kv_data and get_kv_data methods in Context class to accept dictionary values --- src/astrbot_sdk/api/star/context.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/astrbot_sdk/api/star/context.py b/src/astrbot_sdk/api/star/context.py index ed6c8e0a7..631afc389 100644 --- a/src/astrbot_sdk/api/star/context.py +++ b/src/astrbot_sdk/api/star/context.py @@ -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: