1
0
mirror of https://github.com/eternnoir/pyTelegramBotAPI.git synced 2023-08-10 21:12:57 +03:00

Fixed default parse mode in asynctelebot

This commit is contained in:
coder2020official 2022-05-21 17:10:45 +05:00
parent 33375ac135
commit d954f8f5b3

View File

@ -1674,6 +1674,8 @@ class AsyncTeleBot:
:param protect_content: :param protect_content:
:return: API reply. :return: API reply.
""" """
parse_mode = self.parse_mode if (parse_mode is None) else parse_mode
return types.MessageID.de_json( return types.MessageID.de_json(
await asyncio_helper.copy_message(self.token, chat_id, from_chat_id, message_id, caption, parse_mode, caption_entities, await asyncio_helper.copy_message(self.token, chat_id, from_chat_id, message_id, caption, parse_mode, caption_entities,
disable_notification, reply_to_message_id, allow_sending_without_reply, reply_markup, disable_notification, reply_to_message_id, allow_sending_without_reply, reply_markup,
@ -3112,6 +3114,8 @@ class AsyncTeleBot:
if isinstance(question, types.Poll): if isinstance(question, types.Poll):
raise RuntimeError("The send_poll signature was changed, please see send_poll function details.") raise RuntimeError("The send_poll signature was changed, please see send_poll function details.")
explanation_parse_mode = self.parse_mode if (explanation_parse_mode is None) else explanation_parse_mode
return types.Message.de_json( return types.Message.de_json(
await asyncio_helper.send_poll( await asyncio_helper.send_poll(
self.token, chat_id, self.token, chat_id,