Added __call__ method to TelegramMethod class.

This commit is contained in:
qvvonk 2024-12-12 18:44:24 +03:00
parent 6520b9fba2
commit 0a79c5d96e

View file

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