Coroutines must be awaited!
Accept format keyword arguments.
This commit is contained in:
parent
269f167be5
commit
b0d97265b5
@ -7,7 +7,7 @@ __author__ = "Davide Testa"
|
|||||||
__email__ = "davte@libero.it"
|
__email__ = "davte@libero.it"
|
||||||
__credits__ = "Marco Origlia"
|
__credits__ = "Marco Origlia"
|
||||||
__license__ = "GNU General Public License v3.0"
|
__license__ = "GNU General Public License v3.0"
|
||||||
__version__ = "1.4.10"
|
__version__ = "1.4.11"
|
||||||
__maintainer__ = "Davide Testa"
|
__maintainer__ = "Davide Testa"
|
||||||
__contact__ = "t.me/davte"
|
__contact__ = "t.me/davte"
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ async def _forward_to(update, bot, sender, addressee, is_admin=False):
|
|||||||
pass # Remove custom parser to sender and addressee
|
pass # Remove custom parser to sender and addressee
|
||||||
else:
|
else:
|
||||||
bot.set_custom_parser(
|
bot.set_custom_parser(
|
||||||
async_wrapper(
|
await async_wrapper(
|
||||||
_forward_to,
|
_forward_to,
|
||||||
bot=bot,
|
bot=bot,
|
||||||
sender=sender,
|
sender=sender,
|
||||||
|
@ -467,7 +467,8 @@ class Bot(telepot.aio.Bot, Gettable):
|
|||||||
self.last_sending_time['absolute'] = datetime.datetime.now()
|
self.last_sending_time['absolute'] = datetime.datetime.now()
|
||||||
return
|
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.
|
"""Given a list of strings (`fields`), return proper message.
|
||||||
|
|
||||||
If `language` is not passed, it is extracted from `update`.
|
If `language` is not passed, it is extracted from `update`.
|
||||||
@ -517,7 +518,9 @@ class Bot(telepot.aio.Bot, Gettable):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
return "Invalid message!"
|
return "Invalid message!"
|
||||||
return result[language]
|
return result[language].format(
|
||||||
|
**format_kwargs
|
||||||
|
)
|
||||||
|
|
||||||
async def on_inline_query(self, update):
|
async def on_inline_query(self, update):
|
||||||
"""Schedule handling of received inline queries.
|
"""Schedule handling of received inline queries.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user