Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
Co-authored-by: poolitzer <25934244+Poolitzer@users.noreply.github.com>
This commit is contained in:
Bibo-Joshi 2021-10-01 16:51:03 +02:00 committed by Hinrich Mahler
parent ce94651490
commit c486c396da
10 changed files with 23 additions and 26 deletions

View file

@ -144,7 +144,7 @@ Optional Dependencies
PTB can be installed with optional dependencies:
* ``pip install python-telegram-bot[passport]`` installs the `cryptography <https://cryptography.io>`_ library. Use this, if you want to use Telegram Passport related functionality.
* ``pip install python-telegram-bot[ujson]`` installs the `ujson <https://pypi.org/project/ujson/>`_ library. It will then be used for JSON de- & encoding, which can bring speed up compared to the standard `json <https://docs.python.org/3/library/json.html>`_ library.
* ``pip install python-telegram-bot[json]`` installs the `ujson <https://pypi.org/project/ujson/>`_ library. It will then be used for JSON de- & encoding, which can bring speed up compared to the standard `json <https://docs.python.org/3/library/json.html>`_ library.
* ``pip install python-telegram-bot[socks]`` installs the `PySocks <https://pypi.org/project/PySocks/>`_ library. Use this, if you want to work behind a Socks5 server.
===============

View file

@ -144,7 +144,7 @@ Optional Dependencies
PTB can be installed with optional dependencies:
* ``pip install python-telegram-bot-raw[passport]`` installs the `cryptography <https://cryptography.io>`_ library. Use this, if you want to use Telegram Passport related functionality.
* ``pip install python-telegram-bot-raw[ujson]`` installs the `ujson <https://pypi.org/project/ujson/>`_ library. It will then be used for JSON de- & encoding, which can bring speed up compared to the standard `json <https://docs.python.org/3/library/json.html>`_ library.
* ``pip install python-telegram-bot-raw[json]`` installs the `ujson <https://pypi.org/project/ujson/>`_ library. It will then be used for JSON de- & encoding, which can bring speed up compared to the standard `json <https://docs.python.org/3/library/json.html>`_ library.
===============
Getting started

View file

@ -1,4 +1,4 @@
sphinx==3.5.4
sphinx==4.2.0
sphinx-pypi-upload
# When bumping this, make sure to rebuild the dark-mode CSS
# More instructions at source/_static/dark.css

View file

@ -23,7 +23,7 @@ sys.path.insert(0, os.path.abspath('../..'))
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
needs_sphinx = '3.5.2'
needs_sphinx = '4.2.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom

View file

@ -25,7 +25,7 @@ A even more complex example of a bot that uses the nested `ConversationHandler`s
A basic example of a bot store conversation state and user_data over multiple restarts.
### [`inlinekeyboard.py`](https://github.com/python-telegram-bot/python-telegram-bot/blob/master/examples/inlinekeyboard.py)
This example sheds some light on inline keyboards, callback queries and message editing. A wikipedia site explaining this examples lives at https://git.io/JOmFw.
This example sheds some light on inline keyboards, callback queries and message editing. A wiki site explaining this examples lives at https://git.io/JOmFw.
### [`inlinekeyboard2.py`](https://github.com/python-telegram-bot/python-telegram-bot/blob/master/examples/inlinekeyboard2.py)
A more complex example about inline keyboards, callback queries and message editing. This example showcases how an interactive menu could be build using inline keyboards.

View file

@ -1780,8 +1780,8 @@ class Bot(TelegramObject):
Telegram API.
Returns:
:class:`telegram.Message`: On success, if edited message is sent by the bot, the
sent Message is returned, otherwise :obj:`True` is returned.
:class:`telegram.Message`: On success, if edited message is not an inline message, the
edited message is returned, otherwise :obj:`True` is returned.
"""
data: JSONDict = {}
@ -2810,7 +2810,7 @@ class Bot(TelegramObject):
Use this method to edit animation, audio, document, photo, or video messages. If a message
is part of a message album, then it can be edited only to an audio for audio albums, only
to a document for document albums and to a photo or a video otherwise. When an inline
message is edited, a new file can't be uploaded. Use a previously uploaded file via its
message is edited, a new file can't be uploaded; use a previously uploaded file via its
``file_id`` or specify a URL.
Args:
@ -2832,8 +2832,8 @@ class Bot(TelegramObject):
Telegram API.
Returns:
:class:`telegram.Message`: On success, if edited message is not an inline message, the
edited Message is returned, otherwise :obj:`True` is returned.
:class:`telegram.Message`: On success, if the edited message is not an inline message
, the edited Message is returned, otherwise :obj:`True` is returned.
Raises:
:class:`telegram.error.TelegramError`
@ -3398,7 +3398,7 @@ class Bot(TelegramObject):
api_kwargs: JSONDict = None,
) -> Union[Message, bool]:
"""
Use this method to set the score of the specified user in a game.
Use this method to set the score of the specified user in a game message.
Args:
user_id (:obj:`int`): User identifier.
@ -3420,7 +3420,7 @@ class Bot(TelegramObject):
Telegram API.
Returns:
:class:`telegram.Message`: The edited message, or if the message wasn't sent by the bot
:class:`telegram.Message`: The edited message. If the message is not an inline message
, :obj:`True`.
Raises:
@ -5211,8 +5211,7 @@ class Bot(TelegramObject):
Telegram API.
Returns:
:class:`telegram.Poll`: On success, the stopped Poll with the final results is
returned.
:class:`telegram.Poll`: On success, the stopped Poll is returned.
Raises:
:class:`telegram.error.TelegramError`

View file

@ -220,25 +220,25 @@ Attributes:
Attributes:
BOT_COMMAND_SCOPE_DEFAULT (:obj:`str`): ``'default'``
..versionadded:: 13.7
.. versionadded:: 13.7
BOT_COMMAND_SCOPE_ALL_PRIVATE_CHATS (:obj:`str`): ``'all_private_chats'``
..versionadded:: 13.7
.. versionadded:: 13.7
BOT_COMMAND_SCOPE_ALL_GROUP_CHATS (:obj:`str`): ``'all_group_chats'``
..versionadded:: 13.7
.. versionadded:: 13.7
BOT_COMMAND_SCOPE_ALL_CHAT_ADMINISTRATORS (:obj:`str`): ``'all_chat_administrators'``
..versionadded:: 13.7
.. versionadded:: 13.7
BOT_COMMAND_SCOPE_CHAT (:obj:`str`): ``'chat'``
..versionadded:: 13.7
.. versionadded:: 13.7
BOT_COMMAND_SCOPE_CHAT_ADMINISTRATORS (:obj:`str`): ``'chat_administrators'``
..versionadded:: 13.7
.. versionadded:: 13.7
BOT_COMMAND_SCOPE_CHAT_MEMBER (:obj:`str`): ``'chat_member'``
..versionadded:: 13.7
.. versionadded:: 13.7
"""
from typing import List

View file

@ -41,8 +41,6 @@ class JobQueue:
Attributes:
scheduler (:class:`apscheduler.schedulers.background.BackgroundScheduler`): The APScheduler
bot (:class:`telegram.Bot`): The bot instance that should be passed to the jobs.
DEPRECATED: Use :attr:`set_dispatcher` instead.
"""
@ -111,8 +109,7 @@ class JobQueue:
return time
def set_dispatcher(self, dispatcher: 'Dispatcher') -> None:
"""Set the dispatcher to be used by this JobQueue. Use this instead of passing a
:class:`telegram.Bot` to the JobQueue, which is deprecated.
"""Set the dispatcher to be used by this JobQueue.
Args:
dispatcher (:class:`telegram.ext.Dispatcher`): The dispatcher.

View file

@ -47,6 +47,7 @@ class InputFile:
input_file_content (:obj:`bytes`): The binary content of the file to send.
filename (:obj:`str`): Optional. Filename for the file to be sent.
attach (:obj:`str`): Optional. Attach id for sending multiple files.
mimetype (:obj:`str`): Optional. The mimetype inferred from the file to be sent.
"""

View file

@ -27,7 +27,7 @@ class Location(TelegramObject):
"""This object represents a point on the map.
Objects of this class are comparable in terms of equality. Two objects of this class are
considered equal, if their :attr:`longitute` and :attr:`latitude` are equal.
considered equal, if their :attr:`longitude` and :attr:`latitude` are equal.
Args:
longitude (:obj:`float`): Longitude as defined by sender.