mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Add function get_value to FSMContext
This commit is contained in:
parent
acf52f468c
commit
b920fe9325
1 changed files with 3 additions and 0 deletions
|
|
@ -20,6 +20,9 @@ class FSMContext:
|
|||
async def get_data(self) -> Dict[str, Any]:
|
||||
return await self.storage.get_data(key=self.key)
|
||||
|
||||
async def get_value(self, value: str) -> Any:
|
||||
return await self.get_data()[value]
|
||||
|
||||
async def update_data(
|
||||
self, data: Optional[Dict[str, Any]] = None, **kwargs: Any
|
||||
) -> Dict[str, Any]:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue