Add function get_value to FSMContext

This commit is contained in:
wonkagrid 2024-04-01 12:31:04 +03:00
parent acf52f468c
commit b920fe9325

View file

@ -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]: