mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-12-23 06:50:29 +01:00
Renome to default_parse_mode
This commit is contained in:
parent
04de5a54f4
commit
bfe773b4af
2 changed files with 11 additions and 9 deletions
|
@ -82,15 +82,15 @@ class Bot(TelegramObject):
|
|||
:obj:`telegram.utils.request.Request`.
|
||||
private_key (:obj:`bytes`, optional): Private key for decryption of telegram passport data.
|
||||
private_key_password (:obj:`bytes`, optional): Password for above private key.
|
||||
parse_mode (:obj:`str`, optional): Default parse mode used if not set explicitly in method
|
||||
call. See the constants in :class:`telegram.ParseMode` for the available modes.
|
||||
default_parse_mode (:obj:`str`, optional): Default parse mode used if not set explicitly in
|
||||
method call. See the constants in :class:`telegram.ParseMode` for the available modes.
|
||||
|
||||
"""
|
||||
|
||||
def __init__(self, token, base_url=None, base_file_url=None, request=None, private_key=None,
|
||||
private_key_password=None, parse_mode=None):
|
||||
private_key_password=None, default_parse_mode=None):
|
||||
self.token = self._validate_token(token)
|
||||
self.default_parse_mode = parse_mode
|
||||
self.default_parse_mode = default_parse_mode
|
||||
|
||||
if base_url is None:
|
||||
base_url = 'https://api.telegram.org/bot'
|
||||
|
@ -1489,7 +1489,6 @@ class Bot(TelegramObject):
|
|||
data.update(kwargs)
|
||||
|
||||
result = self._request.post(url, data, timeout=timeout)
|
||||
print(data)
|
||||
|
||||
return result
|
||||
|
||||
|
|
|
@ -58,6 +58,8 @@ class Updater(object):
|
|||
persistence (:class:`telegram.ext.BasePersistence`): Optional. The persistence class to
|
||||
store data that should be persistent over restarts.
|
||||
use_context (:obj:`bool`, optional): ``True`` if using context based callbacks.
|
||||
default_parse_mode (:obj:`str`, optional): Default parse mode used if not set explicitly in
|
||||
method call. See the constants in :class:`telegram.ParseMode` for the available modes.
|
||||
|
||||
Args:
|
||||
token (:obj:`str`, optional): The bot's token given by the @BotFather.
|
||||
|
@ -81,8 +83,8 @@ class Updater(object):
|
|||
set this to ``True``.
|
||||
persistence (:class:`telegram.ext.BasePersistence`, optional): The persistence class to
|
||||
store data that should be persistent over restarts.
|
||||
parse_mode (:obj:`str`, optional): Default parse mode used if not set explicitly in method
|
||||
call. See the constants in :class:`telegram.ParseMode` for the available modes.
|
||||
default_parse_mode (:obj:`str`, optional): Default parse mode used if not set explicitly in
|
||||
method call. See the constants in :class:`telegram.ParseMode` for the available modes.
|
||||
|
||||
Note:
|
||||
You must supply either a :attr:`bot` or a :attr:`token` argument.
|
||||
|
@ -104,7 +106,7 @@ class Updater(object):
|
|||
user_sig_handler=None,
|
||||
request_kwargs=None,
|
||||
persistence=None,
|
||||
parse_mode=None,
|
||||
default_parse_mode=None,
|
||||
use_context=False):
|
||||
|
||||
if (token is None) and (bot is None):
|
||||
|
@ -137,7 +139,8 @@ class Updater(object):
|
|||
request_kwargs['con_pool_size'] = con_pool_size
|
||||
self._request = Request(**request_kwargs)
|
||||
self.bot = Bot(token, base_url, request=self._request, private_key=private_key,
|
||||
private_key_password=private_key_password, parse_mode=parse_mode)
|
||||
private_key_password=private_key_password,
|
||||
default_parse_mode=default_parse_mode)
|
||||
self.user_sig_handler = user_sig_handler
|
||||
self.update_queue = Queue()
|
||||
self.job_queue = JobQueue()
|
||||
|
|
Loading…
Reference in a new issue