Documentation Fixes & Improvements (#2969)

Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
This commit is contained in:
Bibo-Joshi 2022-05-06 17:15:23 +02:00 committed by Hinrich Mahler
parent 950d9a0751
commit a10bf3241e
225 changed files with 630 additions and 981 deletions

View file

@ -1,10 +1,11 @@
=================
How To Contribute How To Contribute
================= =================
Every open source project lives from the generous help by contributors that sacrifice their time and ``python-telegram-bot`` is no different. To make participation as pleasant as possible, this project adheres to the `Code of Conduct`_ by the Python Software Foundation. Every open source project lives from the generous help by contributors that sacrifice their time and ``python-telegram-bot`` is no different. To make participation as pleasant as possible, this project adheres to the `Code of Conduct`_ by the Python Software Foundation.
Setting things up Setting things up
----------------- =================
1. Fork the ``python-telegram-bot`` repository to your GitHub account. 1. Fork the ``python-telegram-bot`` repository to your GitHub account.
@ -35,18 +36,18 @@ Setting things up
$ pre-commit install $ pre-commit install
Finding something to do Finding something to do
####################### =======================
If you already know what you'd like to work on, you can skip this section. If you already know what you'd like to work on, you can skip this section.
If you have an idea for something to do, first check if it's already been filed on the `issue tracker`_. If so, add a comment to the issue saying you'd like to work on it, and we'll help you get started! Otherwise, please file a new issue and assign yourself to it. If you have an idea for something to do, first check if it's already been filed on the `issue tracker`_. If so, add a comment to the issue saying you'd like to work on it, and we'll help you get started! Otherwise, please file a new issue and assign yourself to it.
Another great way to start contributing is by writing tests. Tests are really important because they help prevent developers from accidentally breaking existing code, allowing them to build cool things faster. If you're interested in helping out, let the development team know by posting to the `Telegram group`_ (use `@admins` to mention the maintainers), and we'll help you get started. Another great way to start contributing is by writing tests. Tests are really important because they help prevent developers from accidentally breaking existing code, allowing them to build cool things faster. If you're interested in helping out, let the development team know by posting to the `Telegram group`_, and we'll help you get started.
That being said, we want to mention that we are very hesitant about adding new requirements to our projects. If you intend to do this, please state this in an issue and get a verification from one of the maintainers. That being said, we want to mention that we are very hesitant about adding new requirements to our projects. If you intend to do this, please state this in an issue and get a verification from one of the maintainers.
Instructions for making a code change Instructions for making a code change
##################################### =====================================
The central development branch is ``master``, which should be clean and ready for release at any time. In general, all changes should be done as feature branches based off of ``master``. The central development branch is ``master``, which should be clean and ready for release at any time. In general, all changes should be done as feature branches based off of ``master``.
@ -93,13 +94,13 @@ Here's how to make a one-off code change.
- Before making a commit ensure that all automated tests still pass: - Before making a commit ensure that all automated tests still pass:
.. code-block:: .. code-block:: bash
$ pytest -v $ pytest -v
To run ``test_official`` (particularly useful if you made API changes), run To run ``test_official`` (particularly useful if you made API changes), run
.. code-block:: .. code-block:: bash
$ export TEST_OFFICIAL=true $ export TEST_OFFICIAL=true
@ -107,7 +108,7 @@ Here's how to make a one-off code change.
- If you want run style & type checks before committing run - If you want run style & type checks before committing run
.. code-block:: .. code-block:: bash
$ pre-commit run -a $ pre-commit run -a
@ -208,10 +209,10 @@ for new to make relevant changes if said lines don't do what they are supposed t
Style commandments Style commandments
------------------ ==================
Assert comparison order Assert comparison order
####################### -----------------------
Assert statements should compare in **actual** == **expected** order. Assert statements should compare in **actual** == **expected** order.
For example (assuming ``test_call`` is the thing being tested): For example (assuming ``test_call`` is the thing being tested):
@ -225,7 +226,7 @@ For example (assuming ``test_call`` is the thing being tested):
assert 5 == test_call() assert 5 == test_call()
Properly calling callables Properly calling callables
########################## --------------------------
Methods, functions and classes can specify optional parameters (with default Methods, functions and classes can specify optional parameters (with default
values) using Python's keyword arg syntax. When providing a value to such a values) using Python's keyword arg syntax. When providing a value to such a
@ -243,7 +244,7 @@ This gives us the flexibility to re-order arguments and more importantly
to add new required arguments. It's also more explicit and easier to read. to add new required arguments. It's also more explicit and easier to read.
Properly defining optional arguments Properly defining optional arguments
#################################### ------------------------------------
It's always good to not initialize optional arguments at class creation, It's always good to not initialize optional arguments at class creation,
instead use ``**kwargs`` to get them. It's well known Telegram API can instead use ``**kwargs`` to get them. It's well known Telegram API can

View file

@ -1,10 +1,14 @@
# Contributor Covenant Code of Conduct ====================================
Contributor Covenant Code of Conduct
====================================
## Our Pledge Our Pledge
==========
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation. In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
## Our Standards Our Standards
=============
Examples of behavior that contributes to creating a positive environment include: Examples of behavior that contributes to creating a positive environment include:
@ -23,25 +27,26 @@ Examples of unacceptable behavior by participants include:
* Publishing others' private information, such as a physical or electronic address, without explicit permission * Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting * Other conduct which could reasonably be considered inappropriate in a professional setting
## Our Responsibilities Our Responsibilities
====================
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior. Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
## Scope Scope
=====
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers. This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
## Enforcement Enforcement
===========
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at devs@python-telegram-bot.org. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately. Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at devs@python-telegram-bot.org. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership. Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
## Attribution Attribution
===========
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version] This Code of Conduct is adapted from the `Contributor Covenant <http://contributor-covenant.org>`_, version 1.4, available at `http://contributor-covenant.org/version/1/4 <http://contributor-covenant.org/version/1/4/>`_.
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/

View file

@ -6,12 +6,6 @@
:target: https://python-telegram-bot.org :target: https://python-telegram-bot.org
:alt: python-telegram-bot Logo :alt: python-telegram-bot Logo
We have made you a wrapper you can't refuse
We have a vibrant community of developers helping each other in our `Telegram group <https://telegram.me/pythontelegrambotgroup>`_. Join us!
*Stay tuned for library updates and new releases on our* `Telegram Channel <https://telegram.me/pythontelegrambotchannel>`_.
.. image:: https://img.shields.io/pypi/v/python-telegram-bot.svg .. image:: https://img.shields.io/pypi/v/python-telegram-bot.svg
:target: https://pypi.org/project/python-telegram-bot/ :target: https://pypi.org/project/python-telegram-bot/
:alt: PyPi Package Version :alt: PyPi Package Version
@ -29,7 +23,7 @@ We have a vibrant community of developers helping each other in our `Telegram gr
:alt: PyPi Package Monthly Download :alt: PyPi Package Monthly Download
.. image:: https://readthedocs.org/projects/python-telegram-bot/badge/?version=stable .. image:: https://readthedocs.org/projects/python-telegram-bot/badge/?version=stable
:target: https://python-telegram-bot.readthedocs.io/en/stable/?badge=stable :target: https://python-telegram-bot.readthedocs.io/en/stable/
:alt: Documentation Status :alt: Documentation Status
.. image:: https://img.shields.io/pypi/l/python-telegram-bot.svg .. image:: https://img.shields.io/pypi/l/python-telegram-bot.svg
@ -56,44 +50,34 @@ We have a vibrant community of developers helping each other in our `Telegram gr
:target: https://deepsource.io/gh/python-telegram-bot/python-telegram-bot/?ref=repository-badge :target: https://deepsource.io/gh/python-telegram-bot/python-telegram-bot/?ref=repository-badge
:alt: Code quality: DeepSource :alt: Code quality: DeepSource
.. image:: https://results.pre-commit.ci/badge/github/python-telegram-bot/python-telegram-bot/master.svg
:target: https://results.pre-commit.ci/latest/github/python-telegram-bot/python-telegram-bot/master
:alt: pre-commit.ci status
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg .. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black :target: https://github.com/psf/black
:alt: Code Style: Black
.. image:: https://img.shields.io/badge/Telegram-Channel-blue.svg?logo=telegram
:target: https://t.me/pythontelegrambotchannel
:alt: Telegram Channel
.. image:: https://img.shields.io/badge/Telegram-Group-blue.svg?logo=telegram .. image:: https://img.shields.io/badge/Telegram-Group-blue.svg?logo=telegram
:target: https://telegram.me/pythontelegrambotgroup :target: https://telegram.me/pythontelegrambotgroup
:alt: Telegram Group :alt: Telegram Group
================= We have made you a wrapper you can't refuse
Table of contents
=================
- `Introduction`_ We have a vibrant community of developers helping each other in our `Telegram group <https://telegram.me/pythontelegrambotgroup>`_. Join us!
- `Telegram API support`_ *Stay tuned for library updates and new releases on our* `Telegram Channel <https://telegram.me/pythontelegrambotchannel>`_.
- `Installing`_
- `Getting started`_
#. `Learning by example`_
#. `Logging`_
#. `Documentation`_
- `Getting help`_
- `Contributing`_
- `License`_
============
Introduction Introduction
============ ============
This library provides a pure Python interface for the This library provides a pure Python, asynchronous interface for the
`Telegram Bot API <https://core.telegram.org/bots/api>`_. `Telegram Bot API <https://core.telegram.org/bots/api>`_.
It's compatible with Python versions **3.7+**. PTB might also work on `PyPy <http://pypy.org/>`_, though there have been a lot of issues before. Hence, PyPy is not officially supported. It's compatible with Python versions **3.7+**.
In addition to the pure API implementation, this library features a number of high-level classes to In addition to the pure API implementation, this library features a number of high-level classes to
make the development of bots easy and straightforward. These classes are contained in the make the development of bots easy and straightforward. These classes are contained in the
@ -101,51 +85,35 @@ make the development of bots easy and straightforward. These classes are contain
A pure API implementation *without* ``telegram.ext`` is available as the standalone package ``python-telegram-bot-raw``. `See here for details. <https://github.com/python-telegram-bot/python-telegram-bot/blob/master/README_RAW.rst>`_ A pure API implementation *without* ``telegram.ext`` is available as the standalone package ``python-telegram-bot-raw``. `See here for details. <https://github.com/python-telegram-bot/python-telegram-bot/blob/master/README_RAW.rst>`_
----
Note Note
---- ----
Installing both ``python-telegram-bot`` and ``python-telegram-bot-raw`` in conjunction will result in undesired side-effects, so only install *one* of both. Installing both ``python-telegram-bot`` and ``python-telegram-bot-raw`` in conjunction will result in undesired side-effects, so only install *one* of both.
====================
Telegram API support Telegram API support
==================== ====================
All types and methods of the Telegram Bot API **6.0** are supported. All types and methods of the Telegram Bot API **6.0** are supported.
===========
Concurrency
===========
Since v14.0, ``python-telegram-bot`` is built on top of Pythons ``asyncio`` module.
Because ``asyncio`` is in general single-threaded, ``python-telegram-bot`` does currently not aim to be thread-safe.
Noteworthy parts of ``python-telegram-bots`` API that are likely to cause issues (e.g. race conditions) when used in a multi-threaded setting include:
* ``telegram.ext.Application/Updater.update_queue``
* ``telegram.ext.ConversationHandler.check/handle_update``
* ``telegram.ext.CallbackDataCache``
* ``telegram.ext.BasePersistence``
* all classes in the ``telegram.ext.filters`` module that allow to add/remove allowed users/chats at runtime
==========
Installing Installing
========== ==========
You can install or upgrade python-telegram-bot with: You can install or upgrade ``python-telegram-bot`` via
.. code:: shell .. code:: shell
$ pip install python-telegram-bot --upgrade $ pip install python-telegram-bot --upgrade
Or you can install from source with: To install a pre-release, use the ``--pre`` `flag <https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-pre>`_ in addition.
You can also install ``python-telegram-bot`` from source, though this is usually not necessary.
.. code:: shell .. code:: shell
$ git clone https://github.com/python-telegram-bot/python-telegram-bot --recursive $ git clone https://github.com/python-telegram-bot/python-telegram-bot
$ cd python-telegram-bot $ cd python-telegram-bot
$ python setup.py install $ python setup.py install
-----------------------------
Dependencies & Their Versions Dependencies & Their Versions
----------------------------- -----------------------------
@ -163,7 +131,6 @@ To minimize dependency conflicts, we try to be liberal in terms of version requi
On the other hand, we have to ensure stability of ``python-telegram-bot``, which is why we do apply version bounds. On the other hand, we have to ensure stability of ``python-telegram-bot``, which is why we do apply version bounds.
If you encounter dependency conflicts due to these bounds, feel free to reach out. If you encounter dependency conflicts due to these bounds, feel free to reach out.
---------------------
Optional Dependencies Optional Dependencies
--------------------- ---------------------
@ -173,96 +140,62 @@ PTB can be installed with optional dependencies:
* ``pip install python-telegram-bot[json]`` installs the `ujson>=4.0.0 <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>=4.0.0 <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 ``httpx[socks]``. Use this, if you want to work behind a Socks5 server. * ``pip install python-telegram-bot[socks]`` installs ``httpx[socks]``. Use this, if you want to work behind a Socks5 server.
=============== Quick Start
Getting started ===========
===============
Our Wiki contains a lot of resources to get you started with ``python-telegram-bot``: Our Wiki contains an `Introduction to the API <https://github.com/python-telegram-bot/python-telegram-bot/wiki/Introduction-to-the-API>`_ explaining how the pure Bot API can be accessed via ``python-telegram-bot``.
Moreover, the `Tutorial: Your first Bot <https://github.com/python-telegram-bot/python-telegram-bot/wiki/Extensions-%E2%80%93-Your-first-Bot>`_ gives an introduction on how chatbots can be easily programmed with the help of the ``telegram.ext`` module.
- `Introduction to the API <https://github.com/python-telegram-bot/python-telegram-bot/wiki/Introduction-to-the-API>`_ Resources
- Tutorial: `Your first Bot <https://github.com/python-telegram-bot/python-telegram-bot/wiki/Extensions-%E2%80%93-Your-first-Bot>`_ =========
Other references: - The `package documentation <https://python-telegram-bot.readthedocs.io/>`_ is the technical reference for ``python-telegram-bot``.
It contains descriptions of all available classes, modules, methods and arguments.
- The `wiki <https://github.com/python-telegram-bot/python-telegram-bot/wiki/>`_ is home to number of more elaborate introductions of the different features of ``python-telegram-bot`` and other useful resources that go beyond the technical documentation.
- Our `examples directory <https://github.com/python-telegram-bot/python-telegram-bot/blob/master/examples/README.md>`_ contains several examples that showcase the different features of both the Bot API and ``python-telegram-bot``.
Even if it is not your approach for learning, please take a look at ``echobot.py``. It is the de facto base for most of the bots out there.
The code for these examples is released to the public domain, so you can start by grabbing the code and building on top of it.
- The `official Telegram Bot API documentation <https://core.telegram.org/bots/api>`_ is of course always worth a read.
- `Telegram API documentation <https://core.telegram.org/bots/api>`_
- `python-telegram-bot documentation <https://python-telegram-bot.readthedocs.io/>`_
-------------------
Learning by example
-------------------
We believe that the best way to learn this package is by example. Here
are some examples for you to review. Even if it is not your approach for learning, please take a
look at ``echobot.py``. It is the de facto base for most of the bots out there. Best of all,
the code for these examples is released to the public domain, so you can start by grabbing the
code and building on top of it.
Visit `this page <https://github.com/python-telegram-bot/python-telegram-bot/blob/master/examples/README.md>`_ to discover the official examples or look at the examples on the `wiki <https://github.com/python-telegram-bot/python-telegram-bot/wiki/Examples>`_ to see other bots the community has built.
-------
Logging
-------
This library uses the ``logging`` module. To set up logging to standard output, put:
.. code:: python
import logging
logging.basicConfig(
level=logging.DEBUG, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
)
at the beginning of your script.
You can also use logs in your application by calling ``logging.getLogger()`` and setting the log level you want:
.. code:: python
logger = logging.getLogger()
logger.setLevel(logging.INFO)
If you want DEBUG logs instead:
.. code:: python
logger.setLevel(logging.DEBUG)
=============
Documentation
=============
``python-telegram-bot``'s documentation lives at `readthedocs.io <https://python-telegram-bot.readthedocs.io/>`_.
============
Getting help Getting help
============ ============
You can get help in several ways: If the resources mentioned above don't answer your questions or simply overwhelm you, there are several ways of getting help.
1. We have a vibrant community of developers helping each other in our `Telegram group <https://telegram.me/pythontelegrambotgroup>`_. Join us! 1. We have a vibrant community of developers helping each other in our `Telegram group <https://telegram.me/pythontelegrambotgroup>`_. Join us! Asking a question here is often the quickest way to get a pointer in the right direction.
2. Report bugs, request new features or ask questions by `creating an issue <https://github.com/python-telegram-bot/python-telegram-bot/issues/new/choose>`_ or `a discussion <https://github.com/python-telegram-bot/python-telegram-bot/discussions/new>`_. 2. Ask questions by opening `a discussion <https://github.com/python-telegram-bot/python-telegram-bot/discussions/new>`_.
3. Our `Wiki pages <https://github.com/python-telegram-bot/python-telegram-bot/wiki/>`_ offer a growing amount of resources. 3. You can even ask for help on Stack Overflow using the `python-telegram-bot tag <https://stackoverflow.com/questions/tagged/python-telegram-bot>`_.
4. You can even ask for help on Stack Overflow using the `python-telegram-bot tag <https://stackoverflow.com/questions/tagged/python-telegram-bot>`_. Concurrency
===========
Since v20.0, ``python-telegram-bot`` is built on top of Pythons ``asyncio`` module.
Because ``asyncio`` is in general single-threaded, ``python-telegram-bot`` does currently not aim to be thread-safe.
Noteworthy parts of ``python-telegram-bots`` API that are likely to cause issues (e.g. race conditions) when used in a multi-threaded setting include:
* ``telegram.ext.Application/Updater.update_queue``
* ``telegram.ext.ConversationHandler.check/handle_update``
* ``telegram.ext.CallbackDataCache``
* ``telegram.ext.BasePersistence``
* all classes in the ``telegram.ext.filters`` module that allow to add/remove allowed users/chats at runtime
============
Contributing Contributing
============ ============
Contributions of all sizes are welcome. Please review our `contribution guidelines <https://github.com/python-telegram-bot/python-telegram-bot/blob/master/.github/CONTRIBUTING.rst>`_ to get started. You can also help by `reporting bugs <https://github.com/python-telegram-bot/python-telegram-bot/issues/new>`_. Contributions of all sizes are welcome.
Please review our `contribution guidelines <https://github.com/python-telegram-bot/python-telegram-bot/blob/master/.github/CONTRIBUTING.rst>`_ to get started.
You can also help by `reporting bugs or feature requests <https://github.com/python-telegram-bot/python-telegram-bot/issues/new>`_.
========
Donating Donating
======== ========
Occasionally we are asked if we accept donations to support the development. While we appreciate the thought, maintaining PTB is our hobby, and we have almost no running costs for it. We therefore have nothing set up to accept donations. If you still want to donate, we kindly ask you to donate to another open source project/initiative of your choice instead. Occasionally we are asked if we accept donations to support the development.
While we appreciate the thought, maintaining PTB is our hobby, and we have almost no running costs for it. We therefore have nothing set up to accept donations.
If you still want to donate, we kindly ask you to donate to another open source project/initiative of your choice instead.
=======
License License
======= =======
You may copy, distribute and modify the software provided that modifications are described and licensed for free under `LGPL-3 <https://www.gnu.org/licenses/lgpl-3.0.html>`_. Derivatives works (including modifications or anything statically linked to the library) can only be redistributed under LGPL-3, but applications that use the library don't have to be. You may copy, distribute and modify the software provided that modifications are described and licensed for free under `LGPL-3 <https://www.gnu.org/licenses/lgpl-3.0.html>`_.
Derivatives works (including modifications or anything statically linked to the library) can only be redistributed under LGPL-3, but applications that use the library don't have to be.

View file

@ -6,12 +6,6 @@
:target: https://python-telegram-bot.org :target: https://python-telegram-bot.org
:alt: python-telegram-bot-raw Logo :alt: python-telegram-bot-raw Logo
We have made you a wrapper you can't refuse
We have a vibrant community of developers helping each other in our `Telegram group <https://telegram.me/pythontelegrambotgroup>`_. Join us!
*Stay tuned for library updates and new releases on our* `Telegram Channel <https://telegram.me/pythontelegrambotchannel>`_.
.. image:: https://img.shields.io/pypi/v/python-telegram-bot-raw.svg .. image:: https://img.shields.io/pypi/v/python-telegram-bot-raw.svg
:target: https://pypi.org/project/python-telegram-bot-raw/ :target: https://pypi.org/project/python-telegram-bot-raw/
:alt: PyPi Package Version :alt: PyPi Package Version
@ -56,89 +50,71 @@ We have a vibrant community of developers helping each other in our `Telegram gr
:target: https://deepsource.io/gh/python-telegram-bot/python-telegram-bot/?ref=repository-badge :target: https://deepsource.io/gh/python-telegram-bot/python-telegram-bot/?ref=repository-badge
:alt: Code quality: DeepSource :alt: Code quality: DeepSource
.. image:: https://results.pre-commit.ci/badge/github/python-telegram-bot/python-telegram-bot/master.svg
:target: https://results.pre-commit.ci/latest/github/python-telegram-bot/python-telegram-bot/master
:alt: pre-commit.ci status
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg .. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black :target: https://github.com/psf/black
:alt: Code Style: Black
.. image:: https://img.shields.io/badge/Telegram-Channel-blue.svg?logo=telegram
:target: https://t.me/pythontelegrambotchannel
:alt: Telegram Channel
.. image:: https://img.shields.io/badge/Telegram-Group-blue.svg?logo=telegram .. image:: https://img.shields.io/badge/Telegram-Group-blue.svg?logo=telegram
:target: https://telegram.me/pythontelegrambotgroup :target: https://telegram.me/pythontelegrambotgroup
:alt: Telegram Group :alt: Telegram Group
================= We have made you a wrapper you can't refuse
Table of contents
=================
- `Introduction`_ We have a vibrant community of developers helping each other in our `Telegram group <https://telegram.me/pythontelegrambotgroup>`_. Join us!
- `Telegram API support`_ *Stay tuned for library updates and new releases on our* `Telegram Channel <https://telegram.me/pythontelegrambotchannel>`_.
- `Installing`_
- `Getting started`_
#. `Logging`_
#. `Documentation`_
- `Getting help`_
- `Contributing`_
- `License`_
============
Introduction Introduction
============ ============
This library provides a pure Python, lightweight interface for the This library provides a pure Python, asynchronous interface for the
`Telegram Bot API <https://core.telegram.org/bots/api>`_. `Telegram Bot API <https://core.telegram.org/bots/api>`_.
It's compatible with Python versions **3.7+**. PTB-Raw might also work on `PyPy <http://pypy.org/>`_, though there have been a lot of issues before. Hence, PyPy is not officially supported. It's compatible with Python versions **3.7+**.
``python-telegram-bot-raw`` is part of the `python-telegram-bot <https://python-telegram-bot.org>`_ ecosystem and provides the pure API functionality extracted from PTB. It therefore does *not* have independent release schedules, changelogs or documentation. Please consult the PTB resources. ``python-telegram-bot-raw`` is part of the `python-telegram-bot <https://python-telegram-bot.org>`_ ecosystem and provides the pure API functionality extracted from PTB. It therefore does not have independent release schedules, changelogs or documentation.
----
Note Note
---- ----
Installing both ``python-telegram-bot`` and ``python-telegram-bot-raw`` in conjunction will result in undesired side-effects, so only install *one* of both. Installing both ``python-telegram-bot`` and ``python-telegram-bot-raw`` in conjunction will result in undesired side-effects, so only install *one* of both.
====================
Telegram API support Telegram API support
==================== ====================
All types and methods of the Telegram Bot API **6.0** are supported. All types and methods of the Telegram Bot API **6.0** are supported.
===========
Concurrency
===========
Since v14.0, ``python-telegram-bot`` is built on top of Pythons ``asyncio`` module.
Because ``asyncio`` is in general single-threaded, ``python-telegram-bot`` does currently not aim to be thread-safe.
==========
Installing Installing
========== ==========
You can install or upgrade python-telegram-bot-raw with: You can install or upgrade ``python-telegram-bot`` via
.. code:: shell .. code:: shell
$ pip install python-telegram-bot-raw --upgrade $ pip install python-telegram-bot-raw --upgrade
Or you can install from source with: To install a pre-release, use the ``--pre`` `flag <https://pip.pypa.io/en/stable/cli/pip_install/#cmdoption-pre>`_ in addition.
You can also install ``python-telegram-bot-raw`` from source, though this is usually not necessary.
.. code:: shell .. code:: shell
$ git clone https://github.com/python-telegram-bot/python-telegram-bot --recursive $ git clone https://github.com/python-telegram-bot/python-telegram-bot
$ cd python-telegram-bot $ cd python-telegram-bot
$ python setup-raw.py install $ python setup-raw.py install
----
Note Note
---- ----
Installing the `.tar.gz` archive available on PyPi directly via `pip` will *not* work as expected, as `pip` does not recognize that it should use `setup-raw.py` instead of `setup.py`. Installing the ``.tar.gz`` archive available on PyPi directly via ``pip`` will *not* work as expected, as ``pip`` does not recognize that it should use ``setup-raw.py`` instead of ``setup.py``.
-----------------------------
Dependencies & Their Versions Dependencies & Their Versions
----------------------------- -----------------------------
@ -153,88 +129,63 @@ To minimize dependency conflicts, we try to be liberal in terms of version requi
On the other hand, we have to ensure stability of ``python-telegram-bot``, which is why we do apply version bounds. On the other hand, we have to ensure stability of ``python-telegram-bot``, which is why we do apply version bounds.
If you encounter dependency conflicts due to these bounds, feel free to reach out. If you encounter dependency conflicts due to these bounds, feel free to reach out.
---------------------
Optional Dependencies Optional Dependencies
--------------------- ---------------------
PTB can be installed with optional dependencies: ``python-telegram-bot-raw`` can be installed with optional dependencies:
* ``pip install python-telegram-bot-raw[passport]`` installs the `cryptography>=3.0 <https://cryptography.io>`_ library. Use this, if you want to use Telegram Passport related functionality. * ``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-raw[json]`` installs the `ujson>=4.0.0 <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.
=============== Quick Start
Getting started ===========
===============
Our Wiki contains an `Introduction to the API <https://github.com/python-telegram-bot/python-telegram-bot/wiki/Introduction-to-the-API>`_. Other references are: Our Wiki contains an `Introduction to the API <https://github.com/python-telegram-bot/python-telegram-bot/wiki/Introduction-to-the-API>`_ explaining how the pure Bot API can be accessed via ``python-telegram-bot``.
- the `Telegram API documentation <https://core.telegram.org/bots/api>`_ Resources
- the `python-telegram-bot documentation <https://python-telegram-bot.readthedocs.io/>`_ =========
------- - The `package documentation <https://python-telegram-bot.readthedocs.io/>`_ is the technical reference for ``python-telegram-bot``.
Logging It contains descriptions of all available classes, modules, methods and arguments.
------- - The `wiki <https://github.com/python-telegram-bot/python-telegram-bot/wiki/>`_ is home to number of more elaborate introductions of the different features of ``python-telegram-bot`` and other useful resources that go beyond the technical documentation.
- Our `examples directory <https://github.com/python-telegram-bot/python-telegram-bot/blob/master/examples/README.md>`_ contains several examples that showcase the different features of both the Bot API and ``python-telegram-bot``.
Even if it is not your approach for learning, please take a look at ``echobot.py``. It is the de facto base for most of the bots out there.
The code for these examples is released to the public domain, so you can start by grabbing the code and building on top of it.
- The `official Telegram Bot API documentation <https://core.telegram.org/bots/api>`_ is of course always worth a read.
This library uses the ``logging`` module. To set up logging to standard output, put:
.. code:: python
import logging
logging.basicConfig(
level=logging.DEBUG, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
)
at the beginning of your script.
You can also use logs in your application by calling ``logging.getLogger()`` and setting the log level you want:
.. code:: python
logger = logging.getLogger()
logger.setLevel(logging.INFO)
If you want DEBUG logs instead:
.. code:: python
logger.setLevel(logging.DEBUG)
=============
Documentation
=============
``python-telegram-bot``'s documentation lives at `readthedocs.io <https://python-telegram-bot.readthedocs.io/>`_, which
includes the relevant documentation for ``python-telegram-bot-raw``.
============
Getting help Getting help
============ ============
You can get help in several ways: If the resources mentioned above don't answer your questions or simply overwhelm you, there are several ways of getting help.
1. We have a vibrant community of developers helping each other in our `Telegram group <https://telegram.me/pythontelegrambotgroup>`_. Join us! 1. We have a vibrant community of developers helping each other in our `Telegram group <https://telegram.me/pythontelegrambotgroup>`_. Join us! Asking a question here is often the quickest way to get a pointer in the right direction.
2. Report bugs, request new features or ask questions by `creating an issue <https://github.com/python-telegram-bot/python-telegram-bot/issues/new/choose>`_ or `a discussion <https://github.com/python-telegram-bot/python-telegram-bot/discussions/new>`_. 2. Ask questions by opening `a discussion <https://github.com/python-telegram-bot/python-telegram-bot/discussions/new>`_.
3. Our `Wiki pages <https://github.com/python-telegram-bot/python-telegram-bot/wiki/>`_ offer a growing amount of resources. 3. You can even ask for help on Stack Overflow using the `python-telegram-bot tag <https://stackoverflow.com/questions/tagged/python-telegram-bot>`_.
4. You can even ask for help on Stack Overflow using the `python-telegram-bot tag <https://stackoverflow.com/questions/tagged/python-telegram-bot>`_. Concurrency
===========
Since v20.0, ``python-telegram-bot`` is built on top of Pythons ``asyncio`` module.
Because ``asyncio`` is in general single-threaded, ``python-telegram-bot`` does currently not aim to be thread-safe.
============
Contributing Contributing
============ ============
Contributions of all sizes are welcome. Please review our `contribution guidelines <https://github.com/python-telegram-bot/python-telegram-bot/blob/master/.github/CONTRIBUTING.rst>`_ to get started. You can also help by `reporting bugs <https://github.com/python-telegram-bot/python-telegram-bot/issues/new>`_. Contributions of all sizes are welcome.
Please review our `contribution guidelines <https://github.com/python-telegram-bot/python-telegram-bot/blob/master/.github/CONTRIBUTING.rst>`_ to get started.
You can also help by `reporting bugs or feature requests <https://github.com/python-telegram-bot/python-telegram-bot/issues/new>`_.
========
Donating Donating
======== ========
Occasionally we are asked if we accept donations to support the development. While we appreciate the thought, maintaining PTB is our hobby, and we have almost no running costs for it. We therefore have nothing set up to accept donations. If you still want to donate, we kindly ask you to donate to another open source project/initiative of your choice instead. Occasionally we are asked if we accept donations to support the development.
While we appreciate the thought, maintaining PTB is our hobby, and we have almost no running costs for it. We therefore have nothing set up to accept donations.
If you still want to donate, we kindly ask you to donate to another open source project/initiative of your choice instead.
=======
License License
======= =======
You may copy, distribute and modify the software provided that modifications are described and licensed for free under `LGPL-3 <https://www.gnu.org/licenses/lgpl-3.0.html>`_. Derivatives works (including modifications or anything statically linked to the library) can only be redistributed under LGPL-3, but applications that use the library don't have to be. You may copy, distribute and modify the software provided that modifications are described and licensed for free under `LGPL-3 <https://www.gnu.org/licenses/lgpl-3.0.html>`_.
Derivatives works (including modifications or anything statically linked to the library) can only be redistributed under LGPL-3, but applications that use the library don't have to be.

1
docs/source/coc.rst Normal file
View file

@ -0,0 +1 @@
.. include:: ../../CODE_OF_CONDUCT.rst

View file

@ -147,8 +147,7 @@ todo_include_todos = False
html_theme = "furo" html_theme = "furo"
# Theme options are theme-specific and customize the look and feel of a theme # Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the # further. For a list of options available for each theme, see the documentation.
# documentation.
html_theme_options = { html_theme_options = {
"navigation_with_keys": True, "navigation_with_keys": True,
"dark_css_variables": { "dark_css_variables": {
@ -159,10 +158,74 @@ html_theme_options = {
"admonition-title-font-size": "0.95rem", "admonition-title-font-size": "0.95rem",
"admonition-font-size": "0.92rem", "admonition-font-size": "0.92rem",
}, },
"announcement": "PTB has undergone significant changes in v14. Please read the documentation " "announcement": "PTB has undergone significant changes in v20. Please read the documentation "
"carefully and also check out the transition guide in the " "carefully and also check out the transition guide in the "
'<a href="https://github.com/python-telegram-bot/python-telegram-bot/wiki">' '<a href="https://github.com/python-telegram-bot/python-telegram-bot/wiki/'
"wiki</a>.", 'Transition-guide-to-Version-20.0">wiki</a>.',
"footer_icons": [
{
# Telegram channel logo
"name": "Telegram Channel",
"url": "https://t.me/pythontelegrambotchannel/",
# Following svg is from https://react-icons.github.io/react-icons/search?q=telegram
"html": '<svg stroke="currentColor" fill="currentColor" stroke-width="0" '
'viewBox="0 0 16 16" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg">'
'<path d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM8.287 5.906c-.778.324-2.334.994'
"-4.666 2.01-.378.15-.577.298-.595.442-.03.243.275.339.69.47l.175.055c.408.133."
"958.288 1.243.294.26.006.549-.1.868-.32 2.179-1.471 3.304-2.214 3.374-2.23.0"
"5-.012.12-.026.166.016.047.041.042.12.037.141-.03.129-1.227 1.241-1.846 1.81"
"7-.193.18-.33.307-.358.336a8.154 8.154 0 0 1-.188.186c-.38.366-.664.64.015 1.08"
"8.327.216.589.393.85.571.284.194.568.387.936.629.093.06.183.125.27.187.331.23"
"6.63.448.997.414.214-.02.435-.22.547-.82.265-1.417.786-4.486.906-5.751a1.426 "
"1.426 0 0 0-.013-.315.337.337 0 0 0-.114-.217.526.526 0 0 0-.31-.093c-.3.005-.7"
'63.166-2.984 1.09z"></path></svg>',
"class": "",
},
{ # Github logo
"name": "GitHub",
"url": "https://github.com/python-telegram-bot/python-telegram-bot/",
"html": '<svg stroke="currentColor" fill="currentColor" stroke-width="0" '
'viewBox="0 0 16 16"><path fill-rule="evenodd" d="M8 0C3.58 0 0 3.58 0 8c0 3.54 '
"2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.4"
"9-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23"
".82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 "
"0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.2"
"7 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.5"
"1.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 "
'1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0 0 16 8c0-4.42-3.58-8-8-8z">'
"</path></svg>",
"class": "",
},
{ # PTB website logo - globe
"name": "python-telegram-bot website",
"url": "https://python-telegram-bot.org/",
"html": '<svg stroke="currentColor" fill="currentColor" stroke-width="0" '
'viewBox="0 0 16 16" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg">'
'<path d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8zm7.5-6.923c-.67.204-1.335.82-1.887 '
"1.855-.143.268-.276.56-.395.872.705.157 1.472.257 2.282.287V1.077zM4.249 3.53"
"9c.142-.384.304-.744.481-1.078a6.7 6.7 0 0 1 .597-.933A7.01 7.01 0 0 0 3.051 "
"3.05c.362.184.763.349 1.198.49zM3.509 7.5c.036-1.07.188-2.087.436-3.008a9.124 "
"9.124 0 0 1-1.565-.667A6.964 6.964 0 0 0 1.018 7.5h2.49zm1.4-2.741a12.344 "
"12.344 0 0 0-.4 2.741H7.5V5.091c-.91-.03-1.783-.145-2.591-.332zM8.5 5.09V7.5h"
"2.99a12.342 12.342 0 0 0-.399-2.741c-.808.187-1.681.301-2.591.332zM4.51 8.5c.03"
"5.987.176 1.914.399 2.741A13.612 13.612 0 0 1 7.5 10.91V8.5H4.51zm3.99 0v2.409"
"c.91.03 1.783.145 2.591.332.223-.827.364-1.754.4-2.741H8.5zm-3.282 3.696c.12.31"
"2.252.604.395.872.552 1.035 1.218 1.65 1.887 1.855V11.91c-.81.03-1.577.13-2.28"
"2.287zm.11 2.276a6.696 6.696 0 0 1-.598-.933 8.853 8.853 0 0 1-.481-1.079 8.38 "
"8.38 0 0 0-1.198.49 7.01 7.01 0 0 0 2.276 1.522zm-1.383-2.964A13.36 13.36 0 0 1"
" 3.508 8.5h-2.49a6.963 6.963 0 0 0 1.362 3.675c.47-.258.995-.482 1.565-.667zm"
"6.728 2.964a7.009 7.009 0 0 0 2.275-1.521 8.376 8.376 0 0 0-1.197-.49 8.853 "
"8.853 0 0 1-.481 1.078 6.688 6.688 0 0 1-.597.933zM8.5 11.909v3.014c.67-.204 "
"1.335-.82 1.887-1.855.143-.268.276-.56.395-.872A12.63 12.63 0 0 0 8.5 11.91zm"
"3.555-.401c.57.185 1.095.409 1.565.667A6.963 6.963 0 0 0 14.982 8.5h-2.49a1"
"3.36 13.36 0 0 1-.437 3.008zM14.982 7.5a6.963 6.963 0 0 0-1.362-3.675c-.47.25"
"8-.995.482-1.565.667.248.92.4 1.938.437 3.008h2.49zM11.27 2.461c.177.334.339.6"
"94.482 1.078a8.368 8.368 0 0 0 1.196-.49 7.01 7.01 0 0 0-2.275-1.52c.218.283.4"
"18.597.597.932zm-.488 1.343a7.765 7.765 0 0 0-.395-.872C9.835 1.897 9.17 1.282 "
'8.5 1.077V4.09c.81-.03 1.577-.13 2.282-.287z"></path></svg>',
"class": "",
},
],
} }
# Add any paths that contain custom themes here, relative to this directory. # Add any paths that contain custom themes here, relative to this directory.
@ -170,7 +233,7 @@ html_theme_options = {
# The name for this set of Sphinx documents. If None, it defaults to # The name for this set of Sphinx documents. If None, it defaults to
# "<project> v<release> documentation". # "<project> v<release> documentation".
html_title = f"python-telegram-bot<br>v{version}" html_title = f"python-telegram-bot<br> v{version}"
# A shorter title for the navigation bar. Default is the same as html_title. # A shorter title for the navigation bar. Default is the same as html_title.
# html_short_title = None # html_short_title = None

View file

@ -0,0 +1 @@
.. include:: ../../.github/CONTRIBUTING.rst

View file

@ -3,39 +3,29 @@
You can adapt this file completely to your liking, but it should at least You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive. contain the root `toctree` directive.
Welcome to Python Telegram Bot's documentation! .. include:: ../../README.rst
===============================================
Guides and tutorials .. The toctrees are hidden such that they don't reander on the start page but still include the contents into the documentation.
====================
If you're just starting out with the library, we recommend following our `"Your first Bot" <https://github.com/python-telegram-bot/python-telegram-bot/wiki/Extensions-%E2%80%93-Your-first-Bot>`_ tutorial that you can find on our `wiki <https://github.com/python-telegram-bot/python-telegram-bot/wiki>`_.
While being there, you will also find guides to learn how to use handlers, webhooks, proxies, making your bot persistent, and much more.
Examples
========
A great way to learn is by looking at examples. Ours can be found in our `examples folder on Github <https://github.com/python-telegram-bot/python-telegram-bot/tree/master/examples#examples>`_.
Reference
=========
Below you can find a reference of all the classes and methods in python-telegram-bot.
Apart from the `telegram.ext` package and the `Auxiliary` modules, the objects reflect the types defined in the `official Telegram Bot API documentation <https://core.telegram.org/bots/api>`_.
.. toctree:: .. toctree::
telegram.ext :hidden:
:caption: Reference
.. toctree::
telegram telegram
telegram.ext
Changelog telegram_auxil
--------- Telegrams Bot API Docs <https://core.telegram.org/bots/api>
.. toctree:: .. toctree::
:maxdepth: 2 :hidden:
:caption: Project
changelog changelog
Website <https://python-telegram-bot.org>
GitHub Repository <https://github.com/python-telegram-bot/python-telegram-bot/>
Telegram Channel <https://t.me/pythontelegrambotchannel/>
Telegram User Group <https://t.me/pythontelegrambotgroup/>
contributing
coc

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/animation.py
telegram.Animation telegram.Animation
================== ==================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/audio.py
telegram.Audio telegram.Audio
============== ==============

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/bot.py
telegram.Bot telegram.Bot
============ ============

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/botcommand.py
telegram.BotCommand telegram.BotCommand
=================== ===================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/botcommandscope.py
telegram.BotCommandScope telegram.BotCommandScope
======================== ========================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/botcommandscope.py
telegram.BotCommandScopeAllChatAdministrators telegram.BotCommandScopeAllChatAdministrators
============================================= =============================================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/botcommandscope.py
telegram.BotCommandScopeAllGroupChats telegram.BotCommandScopeAllGroupChats
======================================= =======================================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/botcommandscope.py
telegram.BotCommandScopeAllPrivateChats telegram.BotCommandScopeAllPrivateChats
======================================= =======================================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/botcommandscope.py
telegram.BotCommandScopeChat telegram.BotCommandScopeChat
============================ ============================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/botcommandscope.py
telegram.BotCommandScopeChatAdministrators telegram.BotCommandScopeChatAdministrators
========================================== ==========================================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/botcommandscope.py
telegram.BotCommandScopeChatMember telegram.BotCommandScopeChatMember
================================== ==================================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/botcommandscope.py
telegram.BotCommandScopeDefault telegram.BotCommandScopeDefault
=============================== ===============================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/games/callbackgame.py
telegram.Callbackgame telegram.Callbackgame
===================== =====================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/callbackquery.py
telegram.CallbackQuery telegram.CallbackQuery
====================== ======================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chat.py
telegram.Chat telegram.Chat
============= =============

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatinvitelink.py
telegram.ChatInviteLink telegram.ChatInviteLink
======================= =======================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatjoinrequest.py
telegram.ChatJoinRequest telegram.ChatJoinRequest
======================== ========================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatlocation.py
telegram.ChatLocation telegram.ChatLocation
===================== =====================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatmember.py
telegram.ChatMember telegram.ChatMember
=================== ===================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatmember.py
telegram.ChatMemberAdministrator telegram.ChatMemberAdministrator
================================ ================================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatmember.py
telegram.ChatMemberBanned telegram.ChatMemberBanned
========================= =========================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatmember.py
telegram.ChatMemberLeft telegram.ChatMemberLeft
======================= =======================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatmember.py
telegram.ChatMemberMember telegram.ChatMemberMember
========================= =========================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatmember.py
telegram.ChatMemberOwner telegram.ChatMemberOwner
======================== ========================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatmember.py
telegram.ChatMemberRestricted telegram.ChatMemberRestricted
============================= =============================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatmemberupdated.py
telegram.ChatMemberUpdated telegram.ChatMemberUpdated
========================== ==========================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatpermissions.py
telegram.ChatPermissions telegram.ChatPermissions
======================== ========================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/chatphoto.py
telegram.ChatPhoto telegram.ChatPhoto
================== ==================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/choseninlineresult.py
telegram.ChosenInlineResult telegram.ChosenInlineResult
=========================== ===========================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/constants.py
telegram.constants Module telegram.constants Module
========================= =========================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/contact.py
telegram.Contact telegram.Contact
================ ================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/credentials.py
telegram.Credentials telegram.Credentials
==================== ====================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/credentials.py
telegram.DataCredentials telegram.DataCredentials
======================== ========================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/dice.py
telegram.Dice telegram.Dice
============= =============

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/document.py
telegram.Document telegram.Document
================= =================
.. Also lists methods of _BaseThumbedMedium, but not the ones of TelegramObject .. Also lists methods of _BaseThumbedMedium, but not the ones of TelegramObject

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/credentials.py
telegram.EncryptedCredentials telegram.EncryptedCredentials
============================= =============================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/encryptedpassportelement.py
telegram.EncryptedPassportElement telegram.EncryptedPassportElement
================================= =================================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/error.py
telegram.error Module telegram.error Module
===================== =====================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/_application.py
telegram.ext.Application telegram.ext.Application
======================== ========================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/_applicationbuilder.py
telegram.ext.ApplicationBuilder telegram.ext.ApplicationBuilder
=============================== ===============================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/_application.py
telegram.ext.ApplicationHandlerStop telegram.ext.ApplicationHandlerStop
=================================== ===================================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/basepersistence.py
telegram.ext.BasePersistence telegram.ext.BasePersistence
============================ ============================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/callbackcontext.py
telegram.ext.CallbackContext telegram.ext.CallbackContext
============================ ============================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/callbackdatacache.py
telegram.ext.CallbackDataCache telegram.ext.CallbackDataCache
============================== ==============================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/callbackqueryhandler.py
telegram.ext.CallbackQueryHandler telegram.ext.CallbackQueryHandler
================================= =================================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/chatjoinrequesthandler.py
telegram.ext.ChatJoinRequestHandler telegram.ext.ChatJoinRequestHandler
=================================== ===================================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/chatmemberhandler.py
telegram.ext.ChatMemberHandler telegram.ext.ChatMemberHandler
============================== ==============================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/choseninlineresulthandler.py
telegram.ext.ChosenInlineResultHandler telegram.ext.ChosenInlineResultHandler
====================================== ======================================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/commandhandler.py
telegram.ext.CommandHandler telegram.ext.CommandHandler
=========================== ===========================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/contexttypes.py
telegram.ext.ContextTypes telegram.ext.ContextTypes
========================= =========================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/conversationhandler.py
telegram.ext.ConversationHandler telegram.ext.ConversationHandler
================================ ================================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/defaults.py
telegram.ext.Defaults telegram.ext.Defaults
===================== =====================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/dictpersistence.py
telegram.ext.DictPersistence telegram.ext.DictPersistence
============================ ============================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/extbot.py
telegram.ext.ExtBot telegram.ext.ExtBot
=================== ===================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/filters.py
telegram.ext.filters Module telegram.ext.filters Module
=========================== ===========================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/handler.py
telegram.ext.Handler telegram.ext.Handler
==================== ====================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/inlinequeryhandler.py
telegram.ext.InlineQueryHandler telegram.ext.InlineQueryHandler
=============================== ===============================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/callbackdatacache.py
telegram.ext.InvalidCallbackData telegram.ext.InvalidCallbackData
================================ ================================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/jobqueue.py
telegram.ext.Job telegram.ext.Job
===================== =====================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/jobqueue.py
telegram.ext.JobQueue telegram.ext.JobQueue
===================== =====================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/messagehandler.py
telegram.ext.MessageHandler telegram.ext.MessageHandler
=========================== ===========================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/basepersistence.py
telegram.ext.PersistenceInput telegram.ext.PersistenceInput
============================= =============================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/picklepersistence.py
telegram.ext.PicklePersistence telegram.ext.PicklePersistence
============================== ==============================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/pollanswerhandler.py
telegram.ext.PollAnswerHandler telegram.ext.PollAnswerHandler
============================== ==============================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/pollhandler.py
telegram.ext.PollHandler telegram.ext.PollHandler
======================== ========================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/precheckoutqueryhandler.py
telegram.ext.PreCheckoutQueryHandler telegram.ext.PreCheckoutQueryHandler
==================================== ====================================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/commandhandler.py
telegram.ext.PrefixHandler telegram.ext.PrefixHandler
=========================== ===========================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/shippingqueryhandler.py
telegram.ext.ShippingQueryHandler telegram.ext.ShippingQueryHandler
================================= =================================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/stringcommandhandler.py
telegram.ext.StringCommandHandler telegram.ext.StringCommandHandler
================================= =================================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/stringregexhandler.py
telegram.ext.StringRegexHandler telegram.ext.StringRegexHandler
=============================== ===============================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/typehandler.py
telegram.ext.TypeHandler telegram.ext.TypeHandler
======================== ========================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/updater.py
telegram.ext.Updater telegram.ext.Updater
==================== ====================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/file.py
telegram.File telegram.File
============= =============

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/credentials.py
telegram.FileCredentials telegram.FileCredentials
======================== ========================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/forcereply.py
telegram.ForceReply telegram.ForceReply
=================== ===================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/games/game.py
telegram.Game telegram.Game
============= =============

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/games/gamehighscore.py
telegram.GameHighScore telegram.GameHighScore
====================== ======================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/helpers.py
telegram.helpers Module telegram.helpers Module
======================= =======================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/data.py
telegram.IdDocumentData telegram.IdDocumentData
======================= =======================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinekeyboardbutton.py
telegram.InlineKeyboardButton telegram.InlineKeyboardButton
============================= =============================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinekeyboardmarkup.py
telegram.InlineKeyboardMarkup telegram.InlineKeyboardMarkup
============================= =============================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequery.py
telegram.InlineQuery telegram.InlineQuery
==================== ====================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequeryresult.py
telegram.InlineQueryResult telegram.InlineQueryResult
========================== ==========================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequeryresultarticle.py
telegram.InlineQueryResultArticle telegram.InlineQueryResultArticle
================================= =================================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequeryresultaudio.py
telegram.InlineQueryResultAudio telegram.InlineQueryResultAudio
=============================== ===============================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequeryresultcachedaudio.py
telegram.InlineQueryResultCachedAudio telegram.InlineQueryResultCachedAudio
===================================== =====================================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequeryresultcacheddocument.py
telegram.InlineQueryResultCachedDocument telegram.InlineQueryResultCachedDocument
======================================== ========================================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequeryresultcachedgif.py
telegram.InlineQueryResultCachedGif telegram.InlineQueryResultCachedGif
=================================== ===================================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequeryresultcachedmpeg4gif.py
telegram.InlineQueryResultCachedMpeg4Gif telegram.InlineQueryResultCachedMpeg4Gif
======================================== ========================================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequeryresultcachedphoto.py
telegram.InlineQueryResultCachedPhoto telegram.InlineQueryResultCachedPhoto
===================================== =====================================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequeryresultcachedsticker.py
telegram.InlineQueryResultCachedSticker telegram.InlineQueryResultCachedSticker
======================================= =======================================

View file

@ -1,5 +1,3 @@
:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequeryresultcachedvideo.py
telegram.InlineQueryResultCachedVideo telegram.InlineQueryResultCachedVideo
===================================== =====================================

Some files were not shown because too many files have changed in this diff Show more