diff --git a/davtelepot/__init__.py b/davtelepot/__init__.py index 6acee26..bf02132 100644 --- a/davtelepot/__init__.py +++ b/davtelepot/__init__.py @@ -7,7 +7,7 @@ __author__ = "Davide Testa" __email__ = "davte@libero.it" __credits__ = "Marco Origlia" __license__ = "GNU General Public License v3.0" -__version__ = "1.4.10" +__version__ = "1.4.11" __maintainer__ = "Davide Testa" __contact__ = "t.me/davte" diff --git a/davtelepot/admin_tools.py b/davtelepot/admin_tools.py index ccd12e5..c541cae 100644 --- a/davtelepot/admin_tools.py +++ b/davtelepot/admin_tools.py @@ -101,7 +101,7 @@ async def _forward_to(update, bot, sender, addressee, is_admin=False): pass # Remove custom parser to sender and addressee else: bot.set_custom_parser( - async_wrapper( + await async_wrapper( _forward_to, bot=bot, sender=sender, diff --git a/davtelepot/custombot.py b/davtelepot/custombot.py index e6dab06..57887e5 100644 --- a/davtelepot/custombot.py +++ b/davtelepot/custombot.py @@ -467,7 +467,8 @@ class Bot(telepot.aio.Bot, Gettable): self.last_sending_time['absolute'] = datetime.datetime.now() return - def get_message(self, *fields, update=None, language=None): + def get_message(self, *fields, update=None, language=None, + **format_kwargs): """Given a list of strings (`fields`), return proper message. If `language` is not passed, it is extracted from `update`. @@ -517,7 +518,9 @@ class Bot(telepot.aio.Bot, Gettable): ) ) return "Invalid message!" - return result[language] + return result[language].format( + **format_kwargs + ) async def on_inline_query(self, update): """Schedule handling of received inline queries.