From 0a79c5d96e82ba4091bb8855b61f50a35438f1c9 Mon Sep 17 00:00:00 2001 From: qvvonk Date: Thu, 12 Dec 2024 18:44:24 +0300 Subject: [PATCH] Added __call__ method to TelegramMethod class. --- aiogram/methods/base.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aiogram/methods/base.py b/aiogram/methods/base.py index b2d35bec..0c9e64a4 100644 --- a/aiogram/methods/base.py +++ b/aiogram/methods/base.py @@ -93,3 +93,6 @@ class TelegramMethod(BotContextController, BaseModel, Generic[TelegramType], ABC "and then call it `await method()`" ) return self.emit(bot).__await__() + + async def __call__(self) -> TelegramType: + return await self