mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-06 07:50:32 +00:00
Added __call__ method to TelegramMethod class. (#1616)
* Added __call__ method to TelegramMethod class. * Added rst. * Moved rst. * Deleted __call__, changed exception text. * Changed pull request desc text
This commit is contained in:
parent
494e07a75a
commit
f2e305e92a
2 changed files with 2 additions and 1 deletions
1
CHANGES/1616.bugfix.rst
Normal file
1
CHANGES/1616.bugfix.rst
Normal file
|
|
@ -0,0 +1 @@
|
|||
Corrected the exception text of `aiogram.methods.base.TelegramMethod.__await__` method.
|
||||
|
|
@ -90,6 +90,6 @@ class TelegramMethod(BotContextController, BaseModel, Generic[TelegramType], ABC
|
|||
"This method is not mounted to a any bot instance, please call it explicilty "
|
||||
"with bot instance `await bot(method)`\n"
|
||||
"or mount method to a bot instance `method.as_(bot)` "
|
||||
"and then call it `await method()`"
|
||||
"and then call it `await method`"
|
||||
)
|
||||
return self.emit(bot).__await__()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue