From f2e305e92a4f583b8f5d87b67d73237990417536 Mon Sep 17 00:00:00 2001 From: qvvonk Date: Sun, 15 Dec 2024 17:00:21 +0300 Subject: [PATCH] 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 --- CHANGES/1616.bugfix.rst | 1 + aiogram/methods/base.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 CHANGES/1616.bugfix.rst diff --git a/CHANGES/1616.bugfix.rst b/CHANGES/1616.bugfix.rst new file mode 100644 index 00000000..3798d5da --- /dev/null +++ b/CHANGES/1616.bugfix.rst @@ -0,0 +1 @@ +Corrected the exception text of `aiogram.methods.base.TelegramMethod.__await__` method. diff --git a/aiogram/methods/base.py b/aiogram/methods/base.py index b2d35bec..3279199a 100644 --- a/aiogram/methods/base.py +++ b/aiogram/methods/base.py @@ -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__()