mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Added __call__ method to TelegramMethod class.
This commit is contained in:
parent
6520b9fba2
commit
0a79c5d96e
1 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue