mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Merge d4e2356be6 into 4531c3628c
This commit is contained in:
commit
e49142a056
2 changed files with 4 additions and 0 deletions
1
CHANGES/1431.feature.rst
Normal file
1
CHANGES/1431.feature.rst
Normal file
|
|
@ -0,0 +1 @@
|
|||
Added function **get_value** to **FSMContext** class method.
|
||||
|
|
@ -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