diff --git a/.gitignore b/.gitignore index 2586c71..fa4a91e 100644 --- a/.gitignore +++ b/.gitignore @@ -64,6 +64,7 @@ testMain.py #VS Code .vscode/ .DS_Store +*.code-workspace # documentation _build/ diff --git a/telebot/__init__.py b/telebot/__init__.py index 09b3002..abadfe5 100644 --- a/telebot/__init__.py +++ b/telebot/__init__.py @@ -2510,6 +2510,8 @@ class TeleBot: if isinstance(question, types.Poll): 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( apihelper.send_poll( self.token, chat_id, diff --git a/telebot/async_telebot.py b/telebot/async_telebot.py index 35c2da8..e2df525 100644 --- a/telebot/async_telebot.py +++ b/telebot/async_telebot.py @@ -1674,6 +1674,8 @@ class AsyncTeleBot: :param protect_content: :return: API reply. """ + parse_mode = self.parse_mode if (parse_mode is None) else parse_mode + return types.MessageID.de_json( 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, @@ -3112,6 +3114,8 @@ class AsyncTeleBot: if isinstance(question, types.Poll): 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( await asyncio_helper.send_poll( self.token, chat_id, diff --git a/telebot/util.py b/telebot/util.py index f116d9e..31522e5 100644 --- a/telebot/util.py +++ b/telebot/util.py @@ -370,7 +370,8 @@ def quick_markup(values: Dict[str, Dict[str, Any]], row_width: int=2) -> types.I 'switch_inline_query_current_chat': None, 'callback_game': None, 'pay': None, - 'login_url': None + 'login_url': None, + 'web_app': None } :param values: a dict containing all buttons to create in this format: {text: kwargs} {str:}