diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 48d8400bbe4..fe9420fae19 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,7 +27,7 @@ repos: - --rcfile=setup.cfg additional_dependencies: - certifi - - tornado>=6.1 + - tornado==6.1 - APScheduler==3.6.3 - cachetools==4.2.2 - . # this basically does `pip install -e .` @@ -39,7 +39,7 @@ repos: files: ^telegram/.*\.py$ additional_dependencies: - certifi - - tornado>=6.1 + - tornado==6.1 - APScheduler==3.6.3 - cachetools==4.2.2 - . # this basically does `pip install -e .` @@ -51,7 +51,7 @@ repos: - --follow-imports=silent additional_dependencies: - certifi - - tornado>=6.1 + - tornado==6.1 - APScheduler==3.6.3 - cachetools==4.2.2 - . # this basically does `pip install -e .` diff --git a/AUTHORS.rst b/AUTHORS.rst index cde16caa086..f86f6276c0b 100644 --- a/AUTHORS.rst +++ b/AUTHORS.rst @@ -59,6 +59,7 @@ The following wonderful people contributed directly or indirectly to this projec - `ihoru `_ - `Jasmin Bom `_ - `JASON0916 `_ +- `Javad94 `_ - `jeffffc `_ - `Jelle Besseling `_ - `jh0ker `_ diff --git a/CHANGES.rst b/CHANGES.rst index 86898c73b4d..7b53e1786da 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -2,12 +2,49 @@ Changelog ========= +Version 13.14 +============= +*Released 2022-09-04* + +This is the technical changelog for version 13.14. More elaborate release notes can be found in the news channel `@pythontelegrambotchannel `_. + +**Major Changes:** + +- Full Support for API 6.2 (`#3203`_) + +**Minor Changes:** + +- Documentation Improvements (`#3144`_, `#3140`_, `#3164`_) +- Pin `tornado` to Version 6.1 (`#3145`_) + +.. _`#3203`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3203 +.. _`#3144`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3144 +.. _`#3140`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3140 +.. _`#3164`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3164 +.. _`#3145`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3145 + +Version 13.13 +============= +*Released 2022-06-28* + +This is the technical changelog for version 13.13. More elaborate release notes can be found in the news channel `@pythontelegrambotchannel `_. + +**Major Changes:** + +- Full Support for API 6.1 (`#3117`_) + +.. _`#3117`: https://github.com/python-telegram-bot/python-telegram-bot/pull/3117 + Version 13.12 ============= *Released 2022-05-26* This is the technical changelog for version 13.12. More elaborate release notes can be found in the news channel `@pythontelegrambotchannel `_. +**Breaking changes:** + +- Drop support for python 3.6 + **Major Changes:** - Full Support for API 6.0 (`#3027`_) diff --git a/README.rst b/README.rst index fbce7e050e1..01371e8e8cb 100644 --- a/README.rst +++ b/README.rst @@ -20,7 +20,7 @@ We have a vibrant community of developers helping each other in our `Telegram gr :target: https://pypi.org/project/python-telegram-bot/ :alt: Supported Python versions -.. image:: https://img.shields.io/badge/Bot%20API-6.0-blue?logo=telegram +.. image:: https://img.shields.io/badge/Bot%20API-6.2-blue?logo=telegram :target: https://core.telegram.org/bots/api-changelog :alt: Supported Bot API versions @@ -112,7 +112,7 @@ Installing both ``python-telegram-bot`` and ``python-telegram-bot-raw`` in conju 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.2** are supported. ========== Installing diff --git a/README_RAW.rst b/README_RAW.rst index 64955d63c34..f6f0ccf9e48 100644 --- a/README_RAW.rst +++ b/README_RAW.rst @@ -20,7 +20,7 @@ We have a vibrant community of developers helping each other in our `Telegram gr :target: https://pypi.org/project/python-telegram-bot-raw/ :alt: Supported Python versions -.. image:: https://img.shields.io/badge/Bot%20API-6.0-blue?logo=telegram +.. image:: https://img.shields.io/badge/Bot%20API-6.2-blue?logo=telegram :target: https://core.telegram.org/bots/api-changelog :alt: Supported Bot API versions @@ -105,7 +105,7 @@ Installing both ``python-telegram-bot`` and ``python-telegram-bot-raw`` in conju 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.2** are supported. ========== Installing diff --git a/docs/requirements-docs.txt b/docs/requirements-docs.txt index 0c35bfae764..10a77e907be 100644 --- a/docs/requirements-docs.txt +++ b/docs/requirements-docs.txt @@ -1,6 +1,11 @@ sphinx==3.5.4 +# sphinx breaks because it relies on an removed param from jinja2, so pinning to old version +Jinja2<3.1 sphinx-pypi-upload # When bumping this, make sure to rebuild the dark-mode CSS # More instructions at source/_static/dark.css # Ofc once https://github.com/readthedocs/sphinx_rtd_theme/issues/224 is closed, we should use that sphinx_rtd_theme==0.5.2 +# Restricted to fix ImportError for v3.1 and higher of Jinja2 alongside sphinx v3.5.4 as discussed in +# https://github.com/python-telegram-bot/python-telegram-bot/pull/3164#issuecomment-1193002217 +Jinja2<3.1 diff --git a/docs/source/conf.py b/docs/source/conf.py index a6d64a0c180..a4cf83391c2 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -52,7 +52,7 @@ # General information about the project. project = u'python-telegram-bot' -copyright = u'2015-2021, Leandro Toledo' +copyright = u'2015-2022, Leandro Toledo' author = u'Leandro Toledo' # The version info for the project you're documenting, acts as replacement for @@ -60,9 +60,9 @@ # built documents. # # The short X.Y version. -version = '13.12' # telegram.__version__[:3] +version = '13.14' # telegram.__version__[:3] # The full version, including alpha/beta/rc tags. -release = '13.12' # telegram.__version__ +release = '13.14' # telegram.__version__ # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. diff --git a/docs/source/telegram.animation.rst b/docs/source/telegram.animation.rst index 65d2630e61a..1da31f22e1b 100644 --- a/docs/source/telegram.animation.rst +++ b/docs/source/telegram.animation.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/animation.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/files/animation.py telegram.Animation ================== diff --git a/docs/source/telegram.audio.rst b/docs/source/telegram.audio.rst index 9df1943ff01..a2700da9bdf 100644 --- a/docs/source/telegram.audio.rst +++ b/docs/source/telegram.audio.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/audio.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/files/audio.py telegram.Audio ============== diff --git a/docs/source/telegram.bot.rst b/docs/source/telegram.bot.rst index 9869dedc1d2..5563b5f19df 100644 --- a/docs/source/telegram.bot.rst +++ b/docs/source/telegram.bot.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/bot.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/bot.py telegram.Bot ============ diff --git a/docs/source/telegram.botcommand.rst b/docs/source/telegram.botcommand.rst index 26dece6ad36..796349d7336 100644 --- a/docs/source/telegram.botcommand.rst +++ b/docs/source/telegram.botcommand.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/botcommand.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/botcommand.py telegram.BotCommand =================== diff --git a/docs/source/telegram.botcommandscope.rst b/docs/source/telegram.botcommandscope.rst index 6257125203f..30cf060ea7c 100644 --- a/docs/source/telegram.botcommandscope.rst +++ b/docs/source/telegram.botcommandscope.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/botcommandscope.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/botcommandscope.py telegram.BotCommandScope ======================== diff --git a/docs/source/telegram.botcommandscopeallchatadministrators.rst b/docs/source/telegram.botcommandscopeallchatadministrators.rst index fa30ce538b3..dd44835d3c1 100644 --- a/docs/source/telegram.botcommandscopeallchatadministrators.rst +++ b/docs/source/telegram.botcommandscopeallchatadministrators.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/botcommandscope.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/botcommandscope.py telegram.BotCommandScopeAllChatAdministrators ============================================= diff --git a/docs/source/telegram.botcommandscopeallgroupchats.rst b/docs/source/telegram.botcommandscopeallgroupchats.rst index 2c4f672eb60..a02912fc5b2 100644 --- a/docs/source/telegram.botcommandscopeallgroupchats.rst +++ b/docs/source/telegram.botcommandscopeallgroupchats.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/botcommandscope.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/botcommandscope.py telegram.BotCommandScopeAllGroupChats ======================================= diff --git a/docs/source/telegram.botcommandscopeallprivatechats.rst b/docs/source/telegram.botcommandscopeallprivatechats.rst index 91ea4d034a9..59170f5ca7d 100644 --- a/docs/source/telegram.botcommandscopeallprivatechats.rst +++ b/docs/source/telegram.botcommandscopeallprivatechats.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/botcommandscope.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/botcommandscope.py telegram.BotCommandScopeAllPrivateChats ======================================= diff --git a/docs/source/telegram.botcommandscopechat.rst b/docs/source/telegram.botcommandscopechat.rst index dd779542811..a982c96e746 100644 --- a/docs/source/telegram.botcommandscopechat.rst +++ b/docs/source/telegram.botcommandscopechat.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/botcommandscope.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/botcommandscope.py telegram.BotCommandScopeChat ============================ diff --git a/docs/source/telegram.botcommandscopechatadministrators.rst b/docs/source/telegram.botcommandscopechatadministrators.rst index 68cb1328289..e797edc1551 100644 --- a/docs/source/telegram.botcommandscopechatadministrators.rst +++ b/docs/source/telegram.botcommandscopechatadministrators.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/botcommandscope.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/botcommandscope.py telegram.BotCommandScopeChatAdministrators ========================================== diff --git a/docs/source/telegram.botcommandscopechatmember.rst b/docs/source/telegram.botcommandscopechatmember.rst index e28105179e9..f3a1bb4e009 100644 --- a/docs/source/telegram.botcommandscopechatmember.rst +++ b/docs/source/telegram.botcommandscopechatmember.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/botcommandscope.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/botcommandscope.py telegram.BotCommandScopeChatMember ================================== diff --git a/docs/source/telegram.botcommandscopedefault.rst b/docs/source/telegram.botcommandscopedefault.rst index 2705a734c15..07661b08c27 100644 --- a/docs/source/telegram.botcommandscopedefault.rst +++ b/docs/source/telegram.botcommandscopedefault.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/botcommandscope.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/botcommandscope.py telegram.BotCommandScopeDefault =============================== diff --git a/docs/source/telegram.callbackgame.rst b/docs/source/telegram.callbackgame.rst index e2facc41e3d..3659d35d733 100644 --- a/docs/source/telegram.callbackgame.rst +++ b/docs/source/telegram.callbackgame.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/games/callbackgame.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/games/callbackgame.py telegram.Callbackgame ===================== diff --git a/docs/source/telegram.callbackquery.rst b/docs/source/telegram.callbackquery.rst index b628b02368f..35916109fb7 100644 --- a/docs/source/telegram.callbackquery.rst +++ b/docs/source/telegram.callbackquery.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/callbackquery.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/callbackquery.py telegram.CallbackQuery ====================== diff --git a/docs/source/telegram.chat.rst b/docs/source/telegram.chat.rst index 7347e5d1322..ad010af2ecc 100644 --- a/docs/source/telegram.chat.rst +++ b/docs/source/telegram.chat.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chat.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/chat.py telegram.Chat ============= diff --git a/docs/source/telegram.chataction.rst b/docs/source/telegram.chataction.rst index f0ac01110f8..dfae64fd6db 100644 --- a/docs/source/telegram.chataction.rst +++ b/docs/source/telegram.chataction.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chataction.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/chataction.py telegram.ChatAction =================== diff --git a/docs/source/telegram.chatadministratorrights.rst b/docs/source/telegram.chatadministratorrights.rst index 94b2ad7dd99..7170af73752 100644 --- a/docs/source/telegram.chatadministratorrights.rst +++ b/docs/source/telegram.chatadministratorrights.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatadministratorrights.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/chatadministratorrights.py telegram.ChatAdministratorRights ================================ diff --git a/docs/source/telegram.chatinvitelink.rst b/docs/source/telegram.chatinvitelink.rst index e85f97fb69c..9e4b7b05dc5 100644 --- a/docs/source/telegram.chatinvitelink.rst +++ b/docs/source/telegram.chatinvitelink.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatinvitelink.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/chatinvitelink.py telegram.ChatInviteLink ======================= diff --git a/docs/source/telegram.chatjoinrequest.rst b/docs/source/telegram.chatjoinrequest.rst index 4011738459d..e51491907f5 100644 --- a/docs/source/telegram.chatjoinrequest.rst +++ b/docs/source/telegram.chatjoinrequest.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatjoinrequest.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/chatjoinrequest.py telegram.ChatJoinRequest ======================== diff --git a/docs/source/telegram.chatlocation.rst b/docs/source/telegram.chatlocation.rst index dd0c2f006ef..0d32bd37c24 100644 --- a/docs/source/telegram.chatlocation.rst +++ b/docs/source/telegram.chatlocation.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatlocation.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/chatlocation.py telegram.ChatLocation ===================== diff --git a/docs/source/telegram.chatmember.rst b/docs/source/telegram.chatmember.rst index 2aa4a58f2ec..2c0533206e1 100644 --- a/docs/source/telegram.chatmember.rst +++ b/docs/source/telegram.chatmember.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatmember.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/chatmember.py telegram.ChatMember =================== diff --git a/docs/source/telegram.chatmemberadministrator.rst b/docs/source/telegram.chatmemberadministrator.rst index ac510865175..fbe38af0d5b 100644 --- a/docs/source/telegram.chatmemberadministrator.rst +++ b/docs/source/telegram.chatmemberadministrator.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatmember.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/chatmember.py telegram.ChatMemberAdministrator ================================ diff --git a/docs/source/telegram.chatmemberbanned.rst b/docs/source/telegram.chatmemberbanned.rst index 168c2df9675..55c3873ac26 100644 --- a/docs/source/telegram.chatmemberbanned.rst +++ b/docs/source/telegram.chatmemberbanned.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatmember.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/chatmember.py telegram.ChatMemberBanned ========================= diff --git a/docs/source/telegram.chatmemberleft.rst b/docs/source/telegram.chatmemberleft.rst index 6840063c618..52ea62355b6 100644 --- a/docs/source/telegram.chatmemberleft.rst +++ b/docs/source/telegram.chatmemberleft.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatmember.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/chatmember.py telegram.ChatMemberLeft ======================= diff --git a/docs/source/telegram.chatmembermember.rst b/docs/source/telegram.chatmembermember.rst index 7e2d8293be9..5e937ec063d 100644 --- a/docs/source/telegram.chatmembermember.rst +++ b/docs/source/telegram.chatmembermember.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatmember.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/chatmember.py telegram.ChatMemberMember ========================= diff --git a/docs/source/telegram.chatmemberowner.rst b/docs/source/telegram.chatmemberowner.rst index 784cb644a1a..c648598247a 100644 --- a/docs/source/telegram.chatmemberowner.rst +++ b/docs/source/telegram.chatmemberowner.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatmember.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/chatmember.py telegram.ChatMemberOwner ======================== diff --git a/docs/source/telegram.chatmemberrestricted.rst b/docs/source/telegram.chatmemberrestricted.rst index cd76611fdf8..90d2e07963c 100644 --- a/docs/source/telegram.chatmemberrestricted.rst +++ b/docs/source/telegram.chatmemberrestricted.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatmember.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/chatmember.py telegram.ChatMemberRestricted ============================= diff --git a/docs/source/telegram.chatmemberupdated.rst b/docs/source/telegram.chatmemberupdated.rst index c5c14126055..04e7d0644c3 100644 --- a/docs/source/telegram.chatmemberupdated.rst +++ b/docs/source/telegram.chatmemberupdated.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatmemberupdated.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/chatmemberupdated.py telegram.ChatMemberUpdated ========================== diff --git a/docs/source/telegram.chatpermissions.rst b/docs/source/telegram.chatpermissions.rst index bb180946dda..348c8b7cd4d 100644 --- a/docs/source/telegram.chatpermissions.rst +++ b/docs/source/telegram.chatpermissions.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/chatpermissions.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/chatpermissions.py telegram.ChatPermissions ======================== diff --git a/docs/source/telegram.chatphoto.rst b/docs/source/telegram.chatphoto.rst index 22a9aaad322..3e90ed5c695 100644 --- a/docs/source/telegram.chatphoto.rst +++ b/docs/source/telegram.chatphoto.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/chatphoto.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/files/chatphoto.py telegram.ChatPhoto ================== diff --git a/docs/source/telegram.choseninlineresult.rst b/docs/source/telegram.choseninlineresult.rst index cb997a913c5..a15ea713756 100644 --- a/docs/source/telegram.choseninlineresult.rst +++ b/docs/source/telegram.choseninlineresult.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/choseninlineresult.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/choseninlineresult.py telegram.ChosenInlineResult =========================== diff --git a/docs/source/telegram.constants.rst b/docs/source/telegram.constants.rst index a223a220b18..5d72a79a0a9 100644 --- a/docs/source/telegram.constants.rst +++ b/docs/source/telegram.constants.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/constants.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/constants.py telegram.constants Module ========================= diff --git a/docs/source/telegram.contact.rst b/docs/source/telegram.contact.rst index 345c00584a7..0698c66cbee 100644 --- a/docs/source/telegram.contact.rst +++ b/docs/source/telegram.contact.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/contact.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/files/contact.py telegram.Contact ================ diff --git a/docs/source/telegram.credentials.rst b/docs/source/telegram.credentials.rst index 59f4f36e4a3..714152ff22c 100644 --- a/docs/source/telegram.credentials.rst +++ b/docs/source/telegram.credentials.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/credentials.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/passport/credentials.py telegram.Credentials ==================== diff --git a/docs/source/telegram.datacredentials.rst b/docs/source/telegram.datacredentials.rst index 51d85455fd2..8987e359a2b 100644 --- a/docs/source/telegram.datacredentials.rst +++ b/docs/source/telegram.datacredentials.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/credentials.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/passport/credentials.py telegram.DataCredentials ======================== diff --git a/docs/source/telegram.dice.rst b/docs/source/telegram.dice.rst index 29dedd5b580..5fc6e06abac 100644 --- a/docs/source/telegram.dice.rst +++ b/docs/source/telegram.dice.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/dice.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/dice.py telegram.Dice ============= diff --git a/docs/source/telegram.document.rst b/docs/source/telegram.document.rst index 698247732df..9f2be10de67 100644 --- a/docs/source/telegram.document.rst +++ b/docs/source/telegram.document.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/document.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/files/document.py telegram.Document ================= diff --git a/docs/source/telegram.encryptedcredentials.rst b/docs/source/telegram.encryptedcredentials.rst index 096efbcc03c..6a4f3542ca0 100644 --- a/docs/source/telegram.encryptedcredentials.rst +++ b/docs/source/telegram.encryptedcredentials.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/credentials.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/passport/credentials.py telegram.EncryptedCredentials ============================= diff --git a/docs/source/telegram.encryptedpassportelement.rst b/docs/source/telegram.encryptedpassportelement.rst index 5a9693be3c3..32252a1eecd 100644 --- a/docs/source/telegram.encryptedpassportelement.rst +++ b/docs/source/telegram.encryptedpassportelement.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/encryptedpassportelement.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/passport/encryptedpassportelement.py telegram.EncryptedPassportElement ================================= diff --git a/docs/source/telegram.error.rst b/docs/source/telegram.error.rst index 2d95e7aaf37..63d4927b24f 100644 --- a/docs/source/telegram.error.rst +++ b/docs/source/telegram.error.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/error.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/error.py telegram.error module ===================== diff --git a/docs/source/telegram.ext.basepersistence.rst b/docs/source/telegram.ext.basepersistence.rst index 178d95a8073..8386d939c7b 100644 --- a/docs/source/telegram.ext.basepersistence.rst +++ b/docs/source/telegram.ext.basepersistence.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/basepersistence.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/basepersistence.py telegram.ext.BasePersistence ============================ diff --git a/docs/source/telegram.ext.callbackcontext.rst b/docs/source/telegram.ext.callbackcontext.rst index bd5ff3706cf..a32f0a591ed 100644 --- a/docs/source/telegram.ext.callbackcontext.rst +++ b/docs/source/telegram.ext.callbackcontext.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/callbackcontext.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/callbackcontext.py telegram.ext.CallbackContext ============================ diff --git a/docs/source/telegram.ext.callbackdatacache.rst b/docs/source/telegram.ext.callbackdatacache.rst index e1467e02a32..007a53f261d 100644 --- a/docs/source/telegram.ext.callbackdatacache.rst +++ b/docs/source/telegram.ext.callbackdatacache.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/callbackdatacache.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/callbackdatacache.py telegram.ext.CallbackDataCache ============================== diff --git a/docs/source/telegram.ext.callbackqueryhandler.rst b/docs/source/telegram.ext.callbackqueryhandler.rst index 8f72eecb23f..94dbb70d987 100644 --- a/docs/source/telegram.ext.callbackqueryhandler.rst +++ b/docs/source/telegram.ext.callbackqueryhandler.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/callbackqueryhandler.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/callbackqueryhandler.py telegram.ext.CallbackQueryHandler ================================= diff --git a/docs/source/telegram.ext.chatjoinrequesthandler.rst b/docs/source/telegram.ext.chatjoinrequesthandler.rst index 650ff1b35c0..1a589800192 100644 --- a/docs/source/telegram.ext.chatjoinrequesthandler.rst +++ b/docs/source/telegram.ext.chatjoinrequesthandler.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/chatjoinrequesthandler.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/chatjoinrequesthandler.py telegram.ext.ChatJoinRequestHandler =================================== diff --git a/docs/source/telegram.ext.chatmemberhandler.rst b/docs/source/telegram.ext.chatmemberhandler.rst index 97601495911..7e488123468 100644 --- a/docs/source/telegram.ext.chatmemberhandler.rst +++ b/docs/source/telegram.ext.chatmemberhandler.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/chatmemberhandler.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/chatmemberhandler.py telegram.ext.ChatMemberHandler ============================== diff --git a/docs/source/telegram.ext.choseninlineresulthandler.rst b/docs/source/telegram.ext.choseninlineresulthandler.rst index 8ada326a611..31a78a5f1cb 100644 --- a/docs/source/telegram.ext.choseninlineresulthandler.rst +++ b/docs/source/telegram.ext.choseninlineresulthandler.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/choseninlineresulthandler.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/choseninlineresulthandler.py telegram.ext.ChosenInlineResultHandler ====================================== diff --git a/docs/source/telegram.ext.commandhandler.rst b/docs/source/telegram.ext.commandhandler.rst index 4b8d869e9f6..de0b61c015b 100644 --- a/docs/source/telegram.ext.commandhandler.rst +++ b/docs/source/telegram.ext.commandhandler.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/commandhandler.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/commandhandler.py telegram.ext.CommandHandler =========================== diff --git a/docs/source/telegram.ext.contexttypes.rst b/docs/source/telegram.ext.contexttypes.rst index d0cc0a29a1d..acdf3373594 100644 --- a/docs/source/telegram.ext.contexttypes.rst +++ b/docs/source/telegram.ext.contexttypes.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/contexttypes.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/contexttypes.py telegram.ext.ContextTypes ========================= diff --git a/docs/source/telegram.ext.conversationhandler.rst b/docs/source/telegram.ext.conversationhandler.rst index 2f5007d159a..dae65321159 100644 --- a/docs/source/telegram.ext.conversationhandler.rst +++ b/docs/source/telegram.ext.conversationhandler.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/conversationhandler.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/conversationhandler.py telegram.ext.ConversationHandler ================================ diff --git a/docs/source/telegram.ext.defaults.rst b/docs/source/telegram.ext.defaults.rst index 66a3387049d..ac28883a07c 100644 --- a/docs/source/telegram.ext.defaults.rst +++ b/docs/source/telegram.ext.defaults.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/defaults.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/defaults.py telegram.ext.Defaults ===================== diff --git a/docs/source/telegram.ext.delayqueue.rst b/docs/source/telegram.ext.delayqueue.rst index cf64f2bc780..0368d14d479 100644 --- a/docs/source/telegram.ext.delayqueue.rst +++ b/docs/source/telegram.ext.delayqueue.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/messagequeue.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/messagequeue.py telegram.ext.DelayQueue ======================= diff --git a/docs/source/telegram.ext.dictpersistence.rst b/docs/source/telegram.ext.dictpersistence.rst index 95ea3ef3f27..ca36008fe20 100644 --- a/docs/source/telegram.ext.dictpersistence.rst +++ b/docs/source/telegram.ext.dictpersistence.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/dictpersistence.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/dictpersistence.py telegram.ext.DictPersistence ============================ diff --git a/docs/source/telegram.ext.dispatcher.rst b/docs/source/telegram.ext.dispatcher.rst index 268be2ac0eb..948987cf826 100644 --- a/docs/source/telegram.ext.dispatcher.rst +++ b/docs/source/telegram.ext.dispatcher.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/dispatcher.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/dispatcher.py telegram.ext.Dispatcher ======================= diff --git a/docs/source/telegram.ext.dispatcherhandlerstop.rst b/docs/source/telegram.ext.dispatcherhandlerstop.rst index 6894a840f46..5ec15a9f840 100644 --- a/docs/source/telegram.ext.dispatcherhandlerstop.rst +++ b/docs/source/telegram.ext.dispatcherhandlerstop.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/dispatcher.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/dispatcher.py telegram.ext.DispatcherHandlerStop ================================== diff --git a/docs/source/telegram.ext.extbot.rst b/docs/source/telegram.ext.extbot.rst index a295f2aa4b3..b3389a6e957 100644 --- a/docs/source/telegram.ext.extbot.rst +++ b/docs/source/telegram.ext.extbot.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/extbot.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/extbot.py telegram.ext.ExtBot =================== diff --git a/docs/source/telegram.ext.filters.rst b/docs/source/telegram.ext.filters.rst index c4e12c714d5..0674eb98f7c 100644 --- a/docs/source/telegram.ext.filters.rst +++ b/docs/source/telegram.ext.filters.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/filters.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/filters.py telegram.ext.filters Module =========================== diff --git a/docs/source/telegram.ext.handler.rst b/docs/source/telegram.ext.handler.rst index 065cbba98f1..503ee47108e 100644 --- a/docs/source/telegram.ext.handler.rst +++ b/docs/source/telegram.ext.handler.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/handler.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/handler.py telegram.ext.Handler ==================== diff --git a/docs/source/telegram.ext.inlinequeryhandler.rst b/docs/source/telegram.ext.inlinequeryhandler.rst index ea2ddeaf748..c4e8860a8f8 100644 --- a/docs/source/telegram.ext.inlinequeryhandler.rst +++ b/docs/source/telegram.ext.inlinequeryhandler.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/inlinequeryhandler.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/inlinequeryhandler.py telegram.ext.InlineQueryHandler =============================== diff --git a/docs/source/telegram.ext.invalidcallbackdata.rst b/docs/source/telegram.ext.invalidcallbackdata.rst index 58588d1feef..f81104e1d0b 100644 --- a/docs/source/telegram.ext.invalidcallbackdata.rst +++ b/docs/source/telegram.ext.invalidcallbackdata.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/callbackdatacache.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/callbackdatacache.py telegram.ext.InvalidCallbackData ================================ diff --git a/docs/source/telegram.ext.job.rst b/docs/source/telegram.ext.job.rst index 50bfd9e7b6b..a03fc9ba2c8 100644 --- a/docs/source/telegram.ext.job.rst +++ b/docs/source/telegram.ext.job.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/jobqueue.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/jobqueue.py telegram.ext.Job ===================== diff --git a/docs/source/telegram.ext.jobqueue.rst b/docs/source/telegram.ext.jobqueue.rst index ec5f98398f2..623964c8aef 100644 --- a/docs/source/telegram.ext.jobqueue.rst +++ b/docs/source/telegram.ext.jobqueue.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/jobqueue.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/jobqueue.py telegram.ext.JobQueue ===================== diff --git a/docs/source/telegram.ext.messagehandler.rst b/docs/source/telegram.ext.messagehandler.rst index 262c1aa0665..9a6beac1072 100644 --- a/docs/source/telegram.ext.messagehandler.rst +++ b/docs/source/telegram.ext.messagehandler.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/messagehandler.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/messagehandler.py telegram.ext.MessageHandler =========================== diff --git a/docs/source/telegram.ext.messagequeue.rst b/docs/source/telegram.ext.messagequeue.rst index 0b824f1e9bf..59c3be32cde 100644 --- a/docs/source/telegram.ext.messagequeue.rst +++ b/docs/source/telegram.ext.messagequeue.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/messagequeue.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/messagequeue.py telegram.ext.MessageQueue ========================= diff --git a/docs/source/telegram.ext.picklepersistence.rst b/docs/source/telegram.ext.picklepersistence.rst index fc1dcd7a5c4..5a8b410825e 100644 --- a/docs/source/telegram.ext.picklepersistence.rst +++ b/docs/source/telegram.ext.picklepersistence.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/picklepersistence.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/picklepersistence.py telegram.ext.PicklePersistence ============================== diff --git a/docs/source/telegram.ext.pollanswerhandler.rst b/docs/source/telegram.ext.pollanswerhandler.rst index fa049fa9f27..122ae090856 100644 --- a/docs/source/telegram.ext.pollanswerhandler.rst +++ b/docs/source/telegram.ext.pollanswerhandler.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/pollanswerhandler.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/pollanswerhandler.py telegram.ext.PollAnswerHandler ============================== diff --git a/docs/source/telegram.ext.pollhandler.rst b/docs/source/telegram.ext.pollhandler.rst index 14a9d003a52..e4da5a1d9c7 100644 --- a/docs/source/telegram.ext.pollhandler.rst +++ b/docs/source/telegram.ext.pollhandler.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/pollhandler.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/pollhandler.py telegram.ext.PollHandler ======================== diff --git a/docs/source/telegram.ext.precheckoutqueryhandler.rst b/docs/source/telegram.ext.precheckoutqueryhandler.rst index c7138853dae..ca8f3e5f057 100644 --- a/docs/source/telegram.ext.precheckoutqueryhandler.rst +++ b/docs/source/telegram.ext.precheckoutqueryhandler.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/precheckoutqueryhandler.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/precheckoutqueryhandler.py telegram.ext.PreCheckoutQueryHandler ==================================== diff --git a/docs/source/telegram.ext.prefixhandler.rst b/docs/source/telegram.ext.prefixhandler.rst index d61e3589298..340f9a15b0f 100644 --- a/docs/source/telegram.ext.prefixhandler.rst +++ b/docs/source/telegram.ext.prefixhandler.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/commandhandler.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/commandhandler.py telegram.ext.PrefixHandler =========================== diff --git a/docs/source/telegram.ext.regexhandler.rst b/docs/source/telegram.ext.regexhandler.rst index efe40ef29c7..8f2096a9ac0 100644 --- a/docs/source/telegram.ext.regexhandler.rst +++ b/docs/source/telegram.ext.regexhandler.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/regexhandler.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/regexhandler.py telegram.ext.RegexHandler ========================= diff --git a/docs/source/telegram.ext.shippingqueryhandler.rst b/docs/source/telegram.ext.shippingqueryhandler.rst index 013ef57b846..5a8c63bb7d5 100644 --- a/docs/source/telegram.ext.shippingqueryhandler.rst +++ b/docs/source/telegram.ext.shippingqueryhandler.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/shippingqueryhandler.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/shippingqueryhandler.py telegram.ext.ShippingQueryHandler ================================= diff --git a/docs/source/telegram.ext.stringcommandhandler.rst b/docs/source/telegram.ext.stringcommandhandler.rst index 5fe5dc82bbb..ce7ab731e0e 100644 --- a/docs/source/telegram.ext.stringcommandhandler.rst +++ b/docs/source/telegram.ext.stringcommandhandler.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/stringcommandhandler.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/stringcommandhandler.py telegram.ext.StringCommandHandler ================================= diff --git a/docs/source/telegram.ext.stringregexhandler.rst b/docs/source/telegram.ext.stringregexhandler.rst index 127239db9d6..f69aea64d2d 100644 --- a/docs/source/telegram.ext.stringregexhandler.rst +++ b/docs/source/telegram.ext.stringregexhandler.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/stringregexhandler.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/stringregexhandler.py telegram.ext.StringRegexHandler =============================== diff --git a/docs/source/telegram.ext.typehandler.rst b/docs/source/telegram.ext.typehandler.rst index 49dfbbf1127..30d6c04793b 100644 --- a/docs/source/telegram.ext.typehandler.rst +++ b/docs/source/telegram.ext.typehandler.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/typehandler.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/typehandler.py telegram.ext.TypeHandler ======================== diff --git a/docs/source/telegram.ext.updater.rst b/docs/source/telegram.ext.updater.rst index dcd8ce4c061..18f4108f723 100644 --- a/docs/source/telegram.ext.updater.rst +++ b/docs/source/telegram.ext.updater.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/updater.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/updater.py telegram.ext.Updater ==================== diff --git a/docs/source/telegram.ext.utils.promise.rst b/docs/source/telegram.ext.utils.promise.rst index aee183d015c..c2fa56900e7 100644 --- a/docs/source/telegram.ext.utils.promise.rst +++ b/docs/source/telegram.ext.utils.promise.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/utils/promise.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/utils/promise.py telegram.ext.utils.promise.Promise ================================== diff --git a/docs/source/telegram.ext.utils.types.rst b/docs/source/telegram.ext.utils.types.rst index 5c501ecf840..181fa833b16 100644 --- a/docs/source/telegram.ext.utils.types.rst +++ b/docs/source/telegram.ext.utils.types.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/ext/utils/types.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/ext/utils/types.py telegram.ext.utils.types Module ================================ diff --git a/docs/source/telegram.file.rst b/docs/source/telegram.file.rst index 8db85d86d16..dfe836fa49c 100644 --- a/docs/source/telegram.file.rst +++ b/docs/source/telegram.file.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/file.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/files/file.py telegram.File ============= diff --git a/docs/source/telegram.filecredentials.rst b/docs/source/telegram.filecredentials.rst index bc2d88e779d..7bc18806cec 100644 --- a/docs/source/telegram.filecredentials.rst +++ b/docs/source/telegram.filecredentials.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/credentials.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/passport/credentials.py telegram.FileCredentials ======================== diff --git a/docs/source/telegram.forcereply.rst b/docs/source/telegram.forcereply.rst index 2ee8edce872..9c046c3b9e9 100644 --- a/docs/source/telegram.forcereply.rst +++ b/docs/source/telegram.forcereply.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/forcereply.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/forcereply.py telegram.ForceReply =================== diff --git a/docs/source/telegram.game.rst b/docs/source/telegram.game.rst index c6f2c51c1e7..a4ff18c80cb 100644 --- a/docs/source/telegram.game.rst +++ b/docs/source/telegram.game.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/games/game.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/games/game.py telegram.Game ============= diff --git a/docs/source/telegram.gamehighscore.rst b/docs/source/telegram.gamehighscore.rst index 84528bdb951..641de60725d 100644 --- a/docs/source/telegram.gamehighscore.rst +++ b/docs/source/telegram.gamehighscore.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/games/gamehighscore.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/games/gamehighscore.py telegram.GameHighScore ====================== diff --git a/docs/source/telegram.iddocumentdata.rst b/docs/source/telegram.iddocumentdata.rst index 85c32271ace..c2e14f0ab33 100644 --- a/docs/source/telegram.iddocumentdata.rst +++ b/docs/source/telegram.iddocumentdata.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/data.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/passport/data.py telegram.IdDocumentData ======================= diff --git a/docs/source/telegram.inlinekeyboardbutton.rst b/docs/source/telegram.inlinekeyboardbutton.rst index dde7af030ca..f82bb439184 100644 --- a/docs/source/telegram.inlinekeyboardbutton.rst +++ b/docs/source/telegram.inlinekeyboardbutton.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinekeyboardbutton.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/inline/inlinekeyboardbutton.py telegram.InlineKeyboardButton ============================= diff --git a/docs/source/telegram.inlinekeyboardmarkup.rst b/docs/source/telegram.inlinekeyboardmarkup.rst index 1a41e0d1d4b..6a6a4e27fd2 100644 --- a/docs/source/telegram.inlinekeyboardmarkup.rst +++ b/docs/source/telegram.inlinekeyboardmarkup.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinekeyboardmarkup.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/inline/inlinekeyboardmarkup.py telegram.InlineKeyboardMarkup ============================= diff --git a/docs/source/telegram.inlinequery.rst b/docs/source/telegram.inlinequery.rst index 00c6566a9b9..24d234852bf 100644 --- a/docs/source/telegram.inlinequery.rst +++ b/docs/source/telegram.inlinequery.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequery.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/inline/inlinequery.py telegram.InlineQuery ==================== diff --git a/docs/source/telegram.inlinequeryresult.rst b/docs/source/telegram.inlinequeryresult.rst index 0d9970b1a1d..05e2fd3f288 100644 --- a/docs/source/telegram.inlinequeryresult.rst +++ b/docs/source/telegram.inlinequeryresult.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequeryresult.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/inline/inlinequeryresult.py telegram.InlineQueryResult ========================== diff --git a/docs/source/telegram.inlinequeryresultarticle.rst b/docs/source/telegram.inlinequeryresultarticle.rst index 46ea88cd72d..ff734d4c045 100644 --- a/docs/source/telegram.inlinequeryresultarticle.rst +++ b/docs/source/telegram.inlinequeryresultarticle.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequeryresultarticle.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/inline/inlinequeryresultarticle.py telegram.InlineQueryResultArticle ================================= diff --git a/docs/source/telegram.inlinequeryresultaudio.rst b/docs/source/telegram.inlinequeryresultaudio.rst index 414b437c7f5..1ca3665d0b1 100644 --- a/docs/source/telegram.inlinequeryresultaudio.rst +++ b/docs/source/telegram.inlinequeryresultaudio.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequeryresultaudio.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/inline/inlinequeryresultaudio.py telegram.InlineQueryResultAudio =============================== diff --git a/docs/source/telegram.inlinequeryresultcachedaudio.rst b/docs/source/telegram.inlinequeryresultcachedaudio.rst index 01431917ac8..727e0d03a1d 100644 --- a/docs/source/telegram.inlinequeryresultcachedaudio.rst +++ b/docs/source/telegram.inlinequeryresultcachedaudio.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequeryresultcachedaudio.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/inline/inlinequeryresultcachedaudio.py telegram.InlineQueryResultCachedAudio ===================================== diff --git a/docs/source/telegram.inlinequeryresultcacheddocument.rst b/docs/source/telegram.inlinequeryresultcacheddocument.rst index 5a23a317e04..d3073b4854d 100644 --- a/docs/source/telegram.inlinequeryresultcacheddocument.rst +++ b/docs/source/telegram.inlinequeryresultcacheddocument.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequeryresultcacheddocument.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/inline/inlinequeryresultcacheddocument.py telegram.InlineQueryResultCachedDocument ======================================== diff --git a/docs/source/telegram.inlinequeryresultcachedgif.rst b/docs/source/telegram.inlinequeryresultcachedgif.rst index a639991db10..ff6b06b8a8b 100644 --- a/docs/source/telegram.inlinequeryresultcachedgif.rst +++ b/docs/source/telegram.inlinequeryresultcachedgif.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequeryresultcachedgif.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/inline/inlinequeryresultcachedgif.py telegram.InlineQueryResultCachedGif =================================== diff --git a/docs/source/telegram.inlinequeryresultcachedmpeg4gif.rst b/docs/source/telegram.inlinequeryresultcachedmpeg4gif.rst index d98da74344f..5ef22e410ab 100644 --- a/docs/source/telegram.inlinequeryresultcachedmpeg4gif.rst +++ b/docs/source/telegram.inlinequeryresultcachedmpeg4gif.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequeryresultcachedmpeg4gif.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/inline/inlinequeryresultcachedmpeg4gif.py telegram.InlineQueryResultCachedMpeg4Gif ======================================== diff --git a/docs/source/telegram.inlinequeryresultcachedphoto.rst b/docs/source/telegram.inlinequeryresultcachedphoto.rst index 882f84ce474..0d878e62103 100644 --- a/docs/source/telegram.inlinequeryresultcachedphoto.rst +++ b/docs/source/telegram.inlinequeryresultcachedphoto.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequeryresultcachedphoto.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/inline/inlinequeryresultcachedphoto.py telegram.InlineQueryResultCachedPhoto ===================================== diff --git a/docs/source/telegram.inlinequeryresultcachedsticker.rst b/docs/source/telegram.inlinequeryresultcachedsticker.rst index 19872be365c..ad2efd1c98d 100644 --- a/docs/source/telegram.inlinequeryresultcachedsticker.rst +++ b/docs/source/telegram.inlinequeryresultcachedsticker.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequeryresultcachedsticker.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/inline/inlinequeryresultcachedsticker.py telegram.InlineQueryResultCachedSticker ======================================= diff --git a/docs/source/telegram.inlinequeryresultcachedvideo.rst b/docs/source/telegram.inlinequeryresultcachedvideo.rst index 567b86b71b2..f5e2ec5ff80 100644 --- a/docs/source/telegram.inlinequeryresultcachedvideo.rst +++ b/docs/source/telegram.inlinequeryresultcachedvideo.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequeryresultcachedvideo.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/inline/inlinequeryresultcachedvideo.py telegram.InlineQueryResultCachedVideo ===================================== diff --git a/docs/source/telegram.inlinequeryresultcachedvoice.rst b/docs/source/telegram.inlinequeryresultcachedvoice.rst index c26bf187246..1a789be8c5c 100644 --- a/docs/source/telegram.inlinequeryresultcachedvoice.rst +++ b/docs/source/telegram.inlinequeryresultcachedvoice.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequeryresultcachedvoice.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/inline/inlinequeryresultcachedvoice.py telegram.InlineQueryResultCachedVoice ===================================== diff --git a/docs/source/telegram.inlinequeryresultcontact.rst b/docs/source/telegram.inlinequeryresultcontact.rst index cd40f9fe858..81d52eff1c7 100644 --- a/docs/source/telegram.inlinequeryresultcontact.rst +++ b/docs/source/telegram.inlinequeryresultcontact.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequeryresultcontact.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/inline/inlinequeryresultcontact.py telegram.InlineQueryResultContact ================================= diff --git a/docs/source/telegram.inlinequeryresultdocument.rst b/docs/source/telegram.inlinequeryresultdocument.rst index 7cdd4601fde..1e622430cbb 100644 --- a/docs/source/telegram.inlinequeryresultdocument.rst +++ b/docs/source/telegram.inlinequeryresultdocument.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequeryresultdocument.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/inline/inlinequeryresultdocument.py telegram.InlineQueryResultDocument ================================== diff --git a/docs/source/telegram.inlinequeryresultgame.rst b/docs/source/telegram.inlinequeryresultgame.rst index dbc57c9deae..308b938d425 100644 --- a/docs/source/telegram.inlinequeryresultgame.rst +++ b/docs/source/telegram.inlinequeryresultgame.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequeryresultgame.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/inline/inlinequeryresultgame.py telegram.InlineQueryResultGame ============================== diff --git a/docs/source/telegram.inlinequeryresultgif.rst b/docs/source/telegram.inlinequeryresultgif.rst index eb02ae7098b..d1f547862d4 100644 --- a/docs/source/telegram.inlinequeryresultgif.rst +++ b/docs/source/telegram.inlinequeryresultgif.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequeryresultgif.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/inline/inlinequeryresultgif.py telegram.InlineQueryResultGif ============================= diff --git a/docs/source/telegram.inlinequeryresultlocation.rst b/docs/source/telegram.inlinequeryresultlocation.rst index 49622306ad9..b2f3bc4b86a 100644 --- a/docs/source/telegram.inlinequeryresultlocation.rst +++ b/docs/source/telegram.inlinequeryresultlocation.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequeryresultlocation.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/inline/inlinequeryresultlocation.py telegram.InlineQueryResultLocation ================================== diff --git a/docs/source/telegram.inlinequeryresultmpeg4gif.rst b/docs/source/telegram.inlinequeryresultmpeg4gif.rst index 72d87c82244..54677a402d7 100644 --- a/docs/source/telegram.inlinequeryresultmpeg4gif.rst +++ b/docs/source/telegram.inlinequeryresultmpeg4gif.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequeryresultmpeg4gif.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/inline/inlinequeryresultmpeg4gif.py telegram.InlineQueryResultMpeg4Gif ================================== diff --git a/docs/source/telegram.inlinequeryresultphoto.rst b/docs/source/telegram.inlinequeryresultphoto.rst index 9e6edd7f408..fdb0aa73772 100644 --- a/docs/source/telegram.inlinequeryresultphoto.rst +++ b/docs/source/telegram.inlinequeryresultphoto.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequeryresultphoto.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/inline/inlinequeryresultphoto.py telegram.InlineQueryResultPhoto =============================== diff --git a/docs/source/telegram.inlinequeryresultvenue.rst b/docs/source/telegram.inlinequeryresultvenue.rst index 50e026353ac..07992f8e19f 100644 --- a/docs/source/telegram.inlinequeryresultvenue.rst +++ b/docs/source/telegram.inlinequeryresultvenue.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequeryresultvenue.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/inline/inlinequeryresultvenue.py telegram.InlineQueryResultVenue =============================== diff --git a/docs/source/telegram.inlinequeryresultvideo.rst b/docs/source/telegram.inlinequeryresultvideo.rst index d760dda182c..cfd487cae54 100644 --- a/docs/source/telegram.inlinequeryresultvideo.rst +++ b/docs/source/telegram.inlinequeryresultvideo.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequeryresultvideo.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/inline/inlinequeryresultvideo.py telegram.InlineQueryResultVideo =============================== diff --git a/docs/source/telegram.inlinequeryresultvoice.rst b/docs/source/telegram.inlinequeryresultvoice.rst index 2e7c139b3ed..8668838a03b 100644 --- a/docs/source/telegram.inlinequeryresultvoice.rst +++ b/docs/source/telegram.inlinequeryresultvoice.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inlinequeryresultvoice.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/inline/inlinequeryresultvoice.py telegram.InlineQueryResultVoice =============================== diff --git a/docs/source/telegram.inputcontactmessagecontent.rst b/docs/source/telegram.inputcontactmessagecontent.rst index d26eaebc3b0..6ebbbd447d0 100644 --- a/docs/source/telegram.inputcontactmessagecontent.rst +++ b/docs/source/telegram.inputcontactmessagecontent.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inputcontactmessagecontent.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/inline/inputcontactmessagecontent.py telegram.InputContactMessageContent =================================== diff --git a/docs/source/telegram.inputfile.rst b/docs/source/telegram.inputfile.rst index 7462feff4ab..721d4c32557 100644 --- a/docs/source/telegram.inputfile.rst +++ b/docs/source/telegram.inputfile.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/inputfile.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/files/inputfile.py telegram.InputFile ================== diff --git a/docs/source/telegram.inputinvoicemessagecontent.rst b/docs/source/telegram.inputinvoicemessagecontent.rst index 071d431093d..691c0abea2e 100644 --- a/docs/source/telegram.inputinvoicemessagecontent.rst +++ b/docs/source/telegram.inputinvoicemessagecontent.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inputinvoicemessagecontent.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/inline/inputinvoicemessagecontent.py telegram.InputInvoiceMessageContent =================================== diff --git a/docs/source/telegram.inputlocationmessagecontent.rst b/docs/source/telegram.inputlocationmessagecontent.rst index 40db11ceb9c..5719a8e9878 100644 --- a/docs/source/telegram.inputlocationmessagecontent.rst +++ b/docs/source/telegram.inputlocationmessagecontent.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inputlocationmessagecontent.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/inline/inputlocationmessagecontent.py telegram.InputLocationMessageContent ==================================== diff --git a/docs/source/telegram.inputmedia.rst b/docs/source/telegram.inputmedia.rst index 5d3e96cf15d..e19725165de 100644 --- a/docs/source/telegram.inputmedia.rst +++ b/docs/source/telegram.inputmedia.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/inputmedia.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/files/inputmedia.py telegram.InputMedia =================== diff --git a/docs/source/telegram.inputmediaanimation.rst b/docs/source/telegram.inputmediaanimation.rst index ca0f302bf8b..0d3203722f1 100644 --- a/docs/source/telegram.inputmediaanimation.rst +++ b/docs/source/telegram.inputmediaanimation.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/inputmedia.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/files/inputmedia.py telegram.InputMediaAnimation ============================ diff --git a/docs/source/telegram.inputmediaaudio.rst b/docs/source/telegram.inputmediaaudio.rst index 9340ae86ee4..85c49f90499 100644 --- a/docs/source/telegram.inputmediaaudio.rst +++ b/docs/source/telegram.inputmediaaudio.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/inputmedia.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/files/inputmedia.py telegram.InputMediaAudio ======================== diff --git a/docs/source/telegram.inputmediadocument.rst b/docs/source/telegram.inputmediadocument.rst index 7fa547dedc5..6921826dd98 100644 --- a/docs/source/telegram.inputmediadocument.rst +++ b/docs/source/telegram.inputmediadocument.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/inputmedia.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/files/inputmedia.py telegram.InputMediaDocument =========================== diff --git a/docs/source/telegram.inputmediaphoto.rst b/docs/source/telegram.inputmediaphoto.rst index 11dc5e99d2f..1bddd78d7cb 100644 --- a/docs/source/telegram.inputmediaphoto.rst +++ b/docs/source/telegram.inputmediaphoto.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/inputmedia.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/files/inputmedia.py telegram.InputMediaPhoto ======================== diff --git a/docs/source/telegram.inputmediavideo.rst b/docs/source/telegram.inputmediavideo.rst index 6f6a128803a..886cb02046e 100644 --- a/docs/source/telegram.inputmediavideo.rst +++ b/docs/source/telegram.inputmediavideo.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/inputmedia.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/files/inputmedia.py telegram.InputMediaVideo ======================== diff --git a/docs/source/telegram.inputmessagecontent.rst b/docs/source/telegram.inputmessagecontent.rst index 26efa6063ff..e7b0e0b4e71 100644 --- a/docs/source/telegram.inputmessagecontent.rst +++ b/docs/source/telegram.inputmessagecontent.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inputmessagecontent.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/inline/inputmessagecontent.py telegram.InputMessageContent ============================ diff --git a/docs/source/telegram.inputtextmessagecontent.rst b/docs/source/telegram.inputtextmessagecontent.rst index 992f02eedd9..f7989f36452 100644 --- a/docs/source/telegram.inputtextmessagecontent.rst +++ b/docs/source/telegram.inputtextmessagecontent.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inputtextmessagecontent.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/inline/inputtextmessagecontent.py telegram.InputTextMessageContent ================================ diff --git a/docs/source/telegram.inputvenuemessagecontent.rst b/docs/source/telegram.inputvenuemessagecontent.rst index ba91631e14b..6788dab0f79 100644 --- a/docs/source/telegram.inputvenuemessagecontent.rst +++ b/docs/source/telegram.inputvenuemessagecontent.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/inline/inputvenuemessagecontent.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/inline/inputvenuemessagecontent.py telegram.InputVenueMessageContent ================================= diff --git a/docs/source/telegram.invoice.rst b/docs/source/telegram.invoice.rst index f5af48a06e2..a4cf0ace885 100644 --- a/docs/source/telegram.invoice.rst +++ b/docs/source/telegram.invoice.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/payment/invoice.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/payment/invoice.py telegram.Invoice ================ diff --git a/docs/source/telegram.keyboardbutton.rst b/docs/source/telegram.keyboardbutton.rst index ccb5b508bcf..517df0c2965 100644 --- a/docs/source/telegram.keyboardbutton.rst +++ b/docs/source/telegram.keyboardbutton.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/keyboardbutton.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/keyboardbutton.py telegram.KeyboardButton ======================= diff --git a/docs/source/telegram.keyboardbuttonpolltype.rst b/docs/source/telegram.keyboardbuttonpolltype.rst index 1c4ef7f2dfd..df219e7603f 100644 --- a/docs/source/telegram.keyboardbuttonpolltype.rst +++ b/docs/source/telegram.keyboardbuttonpolltype.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/keyboardbuttonpolltype.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/keyboardbuttonpolltype.py telegram.KeyboardButtonPollType =============================== diff --git a/docs/source/telegram.labeledprice.rst b/docs/source/telegram.labeledprice.rst index 046cde062ba..646e78f48a7 100644 --- a/docs/source/telegram.labeledprice.rst +++ b/docs/source/telegram.labeledprice.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/payment/labeledprice.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/payment/labeledprice.py telegram.LabeledPrice ===================== diff --git a/docs/source/telegram.location.rst b/docs/source/telegram.location.rst index 22effdd0bce..6ab9204de77 100644 --- a/docs/source/telegram.location.rst +++ b/docs/source/telegram.location.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/location.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/files/location.py telegram.Location ================= diff --git a/docs/source/telegram.loginurl.rst b/docs/source/telegram.loginurl.rst index 2a39d661ef9..2db31f11901 100644 --- a/docs/source/telegram.loginurl.rst +++ b/docs/source/telegram.loginurl.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/loginurl.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/loginurl.py telegram.LoginUrl ================= diff --git a/docs/source/telegram.maskposition.rst b/docs/source/telegram.maskposition.rst index f54fb5ea526..9b4fe295306 100644 --- a/docs/source/telegram.maskposition.rst +++ b/docs/source/telegram.maskposition.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/sticker.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/files/sticker.py telegram.MaskPosition ===================== diff --git a/docs/source/telegram.menubutton.rst b/docs/source/telegram.menubutton.rst index ee5b1d78043..489b162025b 100644 --- a/docs/source/telegram.menubutton.rst +++ b/docs/source/telegram.menubutton.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/menubutton.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/menubutton.py telegram.MenuButton =================== diff --git a/docs/source/telegram.menubuttoncommands.rst b/docs/source/telegram.menubuttoncommands.rst index 20160a89e3d..fbd26a9062f 100644 --- a/docs/source/telegram.menubuttoncommands.rst +++ b/docs/source/telegram.menubuttoncommands.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/menubutton.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/menubutton.py telegram.MenuButtonCommands =========================== diff --git a/docs/source/telegram.menubuttondefault.rst b/docs/source/telegram.menubuttondefault.rst index 3c6e86fac2a..c1f30a48ce4 100644 --- a/docs/source/telegram.menubuttondefault.rst +++ b/docs/source/telegram.menubuttondefault.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/menubutton.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/menubutton.py telegram.MenuButtonDefault ========================== diff --git a/docs/source/telegram.menubuttonwebapp.rst b/docs/source/telegram.menubuttonwebapp.rst index b1a76500f7a..92bbab2b857 100644 --- a/docs/source/telegram.menubuttonwebapp.rst +++ b/docs/source/telegram.menubuttonwebapp.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/menubutton.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/menubutton.py telegram.MenuButtonWebApp ========================= diff --git a/docs/source/telegram.message.rst b/docs/source/telegram.message.rst index 91e3fe39ae1..70d16fe3588 100644 --- a/docs/source/telegram.message.rst +++ b/docs/source/telegram.message.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/message.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/message.py telegram.Message ================ diff --git a/docs/source/telegram.messageautodeletetimerchanged.rst b/docs/source/telegram.messageautodeletetimerchanged.rst index 3553f7d9fd1..6bd990719fd 100644 --- a/docs/source/telegram.messageautodeletetimerchanged.rst +++ b/docs/source/telegram.messageautodeletetimerchanged.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/messageautodeletetimerchanged.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/messageautodeletetimerchanged.py telegram.MessageAutoDeleteTimerChanged ====================================== diff --git a/docs/source/telegram.messageentity.rst b/docs/source/telegram.messageentity.rst index a9a9c421ed8..9f0490f1ac4 100644 --- a/docs/source/telegram.messageentity.rst +++ b/docs/source/telegram.messageentity.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/messageentity.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/messageentity.py telegram.MessageEntity ====================== diff --git a/docs/source/telegram.messageid.rst b/docs/source/telegram.messageid.rst index 1fb90866113..a33551dd431 100644 --- a/docs/source/telegram.messageid.rst +++ b/docs/source/telegram.messageid.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/messageid.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/messageid.py telegram.MessageId ================== diff --git a/docs/source/telegram.orderinfo.rst b/docs/source/telegram.orderinfo.rst index 981768981d0..cdfe68d9cb0 100644 --- a/docs/source/telegram.orderinfo.rst +++ b/docs/source/telegram.orderinfo.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/payment/orderinfo.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/payment/orderinfo.py telegram.OrderInfo ================== diff --git a/docs/source/telegram.parsemode.rst b/docs/source/telegram.parsemode.rst index 5d493949bf7..245236cb143 100644 --- a/docs/source/telegram.parsemode.rst +++ b/docs/source/telegram.parsemode.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/parsemode.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/parsemode.py telegram.ParseMode ================== diff --git a/docs/source/telegram.passportdata.rst b/docs/source/telegram.passportdata.rst index 92b033e4046..bccbbf4afc1 100644 --- a/docs/source/telegram.passportdata.rst +++ b/docs/source/telegram.passportdata.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/passportdata.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/passport/passportdata.py telegram.PassportData ===================== diff --git a/docs/source/telegram.passportelementerror.rst b/docs/source/telegram.passportelementerror.rst index b431f05d8ce..0792b56f6d3 100644 --- a/docs/source/telegram.passportelementerror.rst +++ b/docs/source/telegram.passportelementerror.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/passportelementerrors.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/passport/passportelementerrors.py telegram.PassportElementError ============================= diff --git a/docs/source/telegram.passportelementerrordatafield.rst b/docs/source/telegram.passportelementerrordatafield.rst index 8868e6b15a6..461b29e6e03 100644 --- a/docs/source/telegram.passportelementerrordatafield.rst +++ b/docs/source/telegram.passportelementerrordatafield.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/passportelementerrors.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/passport/passportelementerrors.py telegram.PassportElementErrorDataField ====================================== diff --git a/docs/source/telegram.passportelementerrorfile.rst b/docs/source/telegram.passportelementerrorfile.rst index cb74323302b..d8020beedbf 100644 --- a/docs/source/telegram.passportelementerrorfile.rst +++ b/docs/source/telegram.passportelementerrorfile.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/passportelementerrors.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/passport/passportelementerrors.py telegram.PassportElementErrorFile ================================= diff --git a/docs/source/telegram.passportelementerrorfiles.rst b/docs/source/telegram.passportelementerrorfiles.rst index a6ed2e4a185..069e49285fa 100644 --- a/docs/source/telegram.passportelementerrorfiles.rst +++ b/docs/source/telegram.passportelementerrorfiles.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/passportelementerrors.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/passport/passportelementerrors.py telegram.PassportElementErrorFiles ================================== diff --git a/docs/source/telegram.passportelementerrorfrontside.rst b/docs/source/telegram.passportelementerrorfrontside.rst index 3e57cf2cd19..70c11c84818 100644 --- a/docs/source/telegram.passportelementerrorfrontside.rst +++ b/docs/source/telegram.passportelementerrorfrontside.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/passportelementerrors.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/passport/passportelementerrors.py telegram.PassportElementErrorFrontSide ====================================== diff --git a/docs/source/telegram.passportelementerrorreverseside.rst b/docs/source/telegram.passportelementerrorreverseside.rst index 089eaffb015..00636aa4fad 100644 --- a/docs/source/telegram.passportelementerrorreverseside.rst +++ b/docs/source/telegram.passportelementerrorreverseside.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/passportelementerrors.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/passport/passportelementerrors.py telegram.PassportElementErrorReverseSide ======================================== diff --git a/docs/source/telegram.passportelementerrorselfie.rst b/docs/source/telegram.passportelementerrorselfie.rst index a29b72f5b66..4782ebfc730 100644 --- a/docs/source/telegram.passportelementerrorselfie.rst +++ b/docs/source/telegram.passportelementerrorselfie.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/passportelementerrors.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/passport/passportelementerrors.py telegram.PassportElementErrorSelfie ======================================== diff --git a/docs/source/telegram.passportelementerrortranslationfile.rst b/docs/source/telegram.passportelementerrortranslationfile.rst index df48052ecc9..507112f589f 100644 --- a/docs/source/telegram.passportelementerrortranslationfile.rst +++ b/docs/source/telegram.passportelementerrortranslationfile.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/passportelementerrors.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/passport/passportelementerrors.py telegram.PassportElementErrorTranslationFile ============================================ diff --git a/docs/source/telegram.passportelementerrortranslationfiles.rst b/docs/source/telegram.passportelementerrortranslationfiles.rst index 50c59a4df1d..1bb6bb980c1 100644 --- a/docs/source/telegram.passportelementerrortranslationfiles.rst +++ b/docs/source/telegram.passportelementerrortranslationfiles.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/passportelementerrors.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/passport/passportelementerrors.py telegram.PassportElementErrorTranslationFiles ============================================= diff --git a/docs/source/telegram.passportelementerrorunspecified.rst b/docs/source/telegram.passportelementerrorunspecified.rst index cca80814490..7e33333f18e 100644 --- a/docs/source/telegram.passportelementerrorunspecified.rst +++ b/docs/source/telegram.passportelementerrorunspecified.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/passportelementerrors.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/passport/passportelementerrors.py telegram.PassportElementErrorUnspecified ======================================== diff --git a/docs/source/telegram.passportfile.rst b/docs/source/telegram.passportfile.rst index e5577215e6a..14baf3d331c 100644 --- a/docs/source/telegram.passportfile.rst +++ b/docs/source/telegram.passportfile.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/passportfile.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/passport/passportfile.py telegram.PassportFile ===================== diff --git a/docs/source/telegram.personaldetails.rst b/docs/source/telegram.personaldetails.rst index 7a072b51c3a..afdef5f584c 100644 --- a/docs/source/telegram.personaldetails.rst +++ b/docs/source/telegram.personaldetails.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/data.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/passport/data.py telegram.PersonalDetails ======================== diff --git a/docs/source/telegram.photosize.rst b/docs/source/telegram.photosize.rst index 8b9b20aee39..e68765e9d46 100644 --- a/docs/source/telegram.photosize.rst +++ b/docs/source/telegram.photosize.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/photosize.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/files/photosize.py telegram.PhotoSize ================== diff --git a/docs/source/telegram.poll.rst b/docs/source/telegram.poll.rst index ed401d70775..35854dd400c 100644 --- a/docs/source/telegram.poll.rst +++ b/docs/source/telegram.poll.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/poll.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/poll.py telegram.Poll ============= diff --git a/docs/source/telegram.pollanswer.rst b/docs/source/telegram.pollanswer.rst index a72a8934016..2f66f78db04 100644 --- a/docs/source/telegram.pollanswer.rst +++ b/docs/source/telegram.pollanswer.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/poll.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/poll.py telegram.PollAnswer =================== diff --git a/docs/source/telegram.polloption.rst b/docs/source/telegram.polloption.rst index 02663e9324e..aaf550d0f6f 100644 --- a/docs/source/telegram.polloption.rst +++ b/docs/source/telegram.polloption.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/poll.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/poll.py telegram.PollOption =================== diff --git a/docs/source/telegram.precheckoutquery.rst b/docs/source/telegram.precheckoutquery.rst index 2bac6fa575c..7950f692a67 100644 --- a/docs/source/telegram.precheckoutquery.rst +++ b/docs/source/telegram.precheckoutquery.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/payment/precheckoutquery.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/payment/precheckoutquery.py telegram.PreCheckoutQuery ========================= diff --git a/docs/source/telegram.proximityalerttriggered.rst b/docs/source/telegram.proximityalerttriggered.rst index 251f3a53f7f..7f65c37de96 100644 --- a/docs/source/telegram.proximityalerttriggered.rst +++ b/docs/source/telegram.proximityalerttriggered.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/proximityalerttriggered.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/proximityalerttriggered.py telegram.ProximityAlertTriggered ================================ diff --git a/docs/source/telegram.replykeyboardmarkup.rst b/docs/source/telegram.replykeyboardmarkup.rst index 87ff3af9f61..192e60148ae 100644 --- a/docs/source/telegram.replykeyboardmarkup.rst +++ b/docs/source/telegram.replykeyboardmarkup.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/replykeyboardmarkup.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/replykeyboardmarkup.py telegram.ReplyKeyboardMarkup ============================ diff --git a/docs/source/telegram.replykeyboardremove.rst b/docs/source/telegram.replykeyboardremove.rst index 7e7235b0c99..15dfd1dbae2 100644 --- a/docs/source/telegram.replykeyboardremove.rst +++ b/docs/source/telegram.replykeyboardremove.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/replykeyboardremove.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/replykeyboardremove.py telegram.ReplyKeyboardRemove ============================ diff --git a/docs/source/telegram.replymarkup.rst b/docs/source/telegram.replymarkup.rst index ba262b6b9ec..f8cdf510e5f 100644 --- a/docs/source/telegram.replymarkup.rst +++ b/docs/source/telegram.replymarkup.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/replymarkup.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/replymarkup.py telegram.ReplyMarkup ==================== diff --git a/docs/source/telegram.residentialaddress.rst b/docs/source/telegram.residentialaddress.rst index 6243af42cc2..e54fc9cff51 100644 --- a/docs/source/telegram.residentialaddress.rst +++ b/docs/source/telegram.residentialaddress.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/data.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/passport/data.py telegram.ResidentialAddress =========================== diff --git a/docs/source/telegram.securedata.rst b/docs/source/telegram.securedata.rst index 29091caa227..56c24dca174 100644 --- a/docs/source/telegram.securedata.rst +++ b/docs/source/telegram.securedata.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/credentials.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/passport/credentials.py telegram.SecureData =================== diff --git a/docs/source/telegram.securevalue.rst b/docs/source/telegram.securevalue.rst index f9ca37a3b7d..bcb5cce9415 100644 --- a/docs/source/telegram.securevalue.rst +++ b/docs/source/telegram.securevalue.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/passport/credentials.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/passport/credentials.py telegram.SecureValue ==================== diff --git a/docs/source/telegram.sentwebappmessage.rst b/docs/source/telegram.sentwebappmessage.rst index 156134ad23c..7f575c494c8 100644 --- a/docs/source/telegram.sentwebappmessage.rst +++ b/docs/source/telegram.sentwebappmessage.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/sentwebappmessage.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/sentwebappmessage.py telegram.SentWebAppMessage ========================== diff --git a/docs/source/telegram.shippingaddress.rst b/docs/source/telegram.shippingaddress.rst index c6cee45716c..010f67d23b2 100644 --- a/docs/source/telegram.shippingaddress.rst +++ b/docs/source/telegram.shippingaddress.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/payment/shippingaddress.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/payment/shippingaddress.py telegram.ShippingAddress ======================== diff --git a/docs/source/telegram.shippingoption.rst b/docs/source/telegram.shippingoption.rst index 64024ba90f8..3ef756a1bdc 100644 --- a/docs/source/telegram.shippingoption.rst +++ b/docs/source/telegram.shippingoption.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/payment/shippingoption.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/payment/shippingoption.py telegram.ShippingOption ======================= diff --git a/docs/source/telegram.shippingquery.rst b/docs/source/telegram.shippingquery.rst index d2bf7889c15..5925149d96c 100644 --- a/docs/source/telegram.shippingquery.rst +++ b/docs/source/telegram.shippingquery.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/payment/shippingquery.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/payment/shippingquery.py telegram.ShippingQuery ====================== diff --git a/docs/source/telegram.sticker.rst b/docs/source/telegram.sticker.rst index d5c8f90c302..aefabf9be7d 100644 --- a/docs/source/telegram.sticker.rst +++ b/docs/source/telegram.sticker.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/sticker.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/files/sticker.py telegram.Sticker ================ diff --git a/docs/source/telegram.stickerset.rst b/docs/source/telegram.stickerset.rst index 1c0f77cb255..fdc0fe71f33 100644 --- a/docs/source/telegram.stickerset.rst +++ b/docs/source/telegram.stickerset.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/sticker.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/files/sticker.py telegram.StickerSet =================== diff --git a/docs/source/telegram.successfulpayment.rst b/docs/source/telegram.successfulpayment.rst index c703bd69206..ceb6af62a2d 100644 --- a/docs/source/telegram.successfulpayment.rst +++ b/docs/source/telegram.successfulpayment.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/payment/successfulpayment.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/payment/successfulpayment.py telegram.SuccessfulPayment ========================== diff --git a/docs/source/telegram.update.rst b/docs/source/telegram.update.rst index e19fc411b64..1b4cd11b89a 100644 --- a/docs/source/telegram.update.rst +++ b/docs/source/telegram.update.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/update.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/update.py telegram.Update =============== diff --git a/docs/source/telegram.user.rst b/docs/source/telegram.user.rst index 338631f01ce..44115b29674 100644 --- a/docs/source/telegram.user.rst +++ b/docs/source/telegram.user.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/user.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/user.py telegram.User ============= diff --git a/docs/source/telegram.userprofilephotos.rst b/docs/source/telegram.userprofilephotos.rst index be0cd388e0e..9384a1664a2 100644 --- a/docs/source/telegram.userprofilephotos.rst +++ b/docs/source/telegram.userprofilephotos.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/userprofilephotos.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/userprofilephotos.py telegram.UserProfilePhotos ========================== diff --git a/docs/source/telegram.utils.helpers.rst b/docs/source/telegram.utils.helpers.rst index fe7ffc553ae..3f716d69f59 100644 --- a/docs/source/telegram.utils.helpers.rst +++ b/docs/source/telegram.utils.helpers.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/utils/helpers.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/utils/helpers.py telegram.utils.helpers Module ============================= diff --git a/docs/source/telegram.utils.request.rst b/docs/source/telegram.utils.request.rst index ac061872068..8469f48a2f4 100644 --- a/docs/source/telegram.utils.request.rst +++ b/docs/source/telegram.utils.request.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/utils/request.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/utils/request.py telegram.utils.request.Request ============================== diff --git a/docs/source/telegram.utils.types.rst b/docs/source/telegram.utils.types.rst index 97f88ce4303..a50509bc2ee 100644 --- a/docs/source/telegram.utils.types.rst +++ b/docs/source/telegram.utils.types.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/utils/types.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/utils/types.py telegram.utils.types Module =========================== diff --git a/docs/source/telegram.venue.rst b/docs/source/telegram.venue.rst index a0322f471ae..4f7b703cc35 100644 --- a/docs/source/telegram.venue.rst +++ b/docs/source/telegram.venue.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/venue.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/files/venue.py telegram.Venue ============== diff --git a/docs/source/telegram.video.rst b/docs/source/telegram.video.rst index 6030a1b760d..3e4abafa006 100644 --- a/docs/source/telegram.video.rst +++ b/docs/source/telegram.video.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/video.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/files/video.py telegram.Video ============== diff --git a/docs/source/telegram.videochatended.rst b/docs/source/telegram.videochatended.rst index 15ee4a1e06c..6c7285cbc05 100644 --- a/docs/source/telegram.videochatended.rst +++ b/docs/source/telegram.videochatended.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/videochatended.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/videochatended.py telegram.VideoChatEnded ======================= diff --git a/docs/source/telegram.videochatparticipantsinvited.rst b/docs/source/telegram.videochatparticipantsinvited.rst index 2185df16417..93e20bb78a6 100644 --- a/docs/source/telegram.videochatparticipantsinvited.rst +++ b/docs/source/telegram.videochatparticipantsinvited.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/videochatparticipantsinvited.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/videochatparticipantsinvited.py telegram.VideoChatParticipantsInvited ===================================== diff --git a/docs/source/telegram.videochatscheduled.rst b/docs/source/telegram.videochatscheduled.rst index 0c68e3f62ea..02072cc6a85 100644 --- a/docs/source/telegram.videochatscheduled.rst +++ b/docs/source/telegram.videochatscheduled.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/videochatscheduled.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/videochatscheduled.py telegram.VideoChatScheduled =========================== diff --git a/docs/source/telegram.videochatstarted.rst b/docs/source/telegram.videochatstarted.rst index 7cb09016fa9..393e69bcb79 100644 --- a/docs/source/telegram.videochatstarted.rst +++ b/docs/source/telegram.videochatstarted.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/videochatstarted.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/videochatstarted.py telegram.VideoChatStarted ========================= diff --git a/docs/source/telegram.videonote.rst b/docs/source/telegram.videonote.rst index ca0f99f53c2..4e1a7f1b0f6 100644 --- a/docs/source/telegram.videonote.rst +++ b/docs/source/telegram.videonote.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/videonote.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/files/videonote.py telegram.VideoNote ================== diff --git a/docs/source/telegram.voice.rst b/docs/source/telegram.voice.rst index 9489eb0f6cc..a82f3f28c9b 100644 --- a/docs/source/telegram.voice.rst +++ b/docs/source/telegram.voice.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/files/voice.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/files/voice.py telegram.Voice ============== diff --git a/docs/source/telegram.voicechatended.rst b/docs/source/telegram.voicechatended.rst index d83729400d8..349ba4ebe92 100644 --- a/docs/source/telegram.voicechatended.rst +++ b/docs/source/telegram.voicechatended.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/voicechat.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/voicechat.py telegram.VoiceChatEnded ======================= diff --git a/docs/source/telegram.voicechatparticipantsinvited.rst b/docs/source/telegram.voicechatparticipantsinvited.rst index 300609e001a..ca5a6ea3c01 100644 --- a/docs/source/telegram.voicechatparticipantsinvited.rst +++ b/docs/source/telegram.voicechatparticipantsinvited.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/voicechat.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/voicechat.py telegram.VoiceChatParticipantsInvited ===================================== diff --git a/docs/source/telegram.voicechatscheduled.rst b/docs/source/telegram.voicechatscheduled.rst index 2416a3bbcd4..be515551ff2 100644 --- a/docs/source/telegram.voicechatscheduled.rst +++ b/docs/source/telegram.voicechatscheduled.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/voicechat.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/voicechat.py telegram.VoiceChatScheduled =========================== diff --git a/docs/source/telegram.voicechatstarted.rst b/docs/source/telegram.voicechatstarted.rst index e6aa049980d..7e9f183f6df 100644 --- a/docs/source/telegram.voicechatstarted.rst +++ b/docs/source/telegram.voicechatstarted.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/voicechat.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/voicechat.py telegram.VoiceChatStarted ========================= diff --git a/docs/source/telegram.webappdata.rst b/docs/source/telegram.webappdata.rst index e6acd8f320c..15b21188a91 100644 --- a/docs/source/telegram.webappdata.rst +++ b/docs/source/telegram.webappdata.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/webappdata.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/webappdata.py telegram.WebAppData =================== diff --git a/docs/source/telegram.webappinfo.rst b/docs/source/telegram.webappinfo.rst index 70646a00eeb..4ea91939d3f 100644 --- a/docs/source/telegram.webappinfo.rst +++ b/docs/source/telegram.webappinfo.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/webappinfo.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/webappinfo.py telegram.WebAppInfo =================== diff --git a/docs/source/telegram.webhookinfo.rst b/docs/source/telegram.webhookinfo.rst index fabf0e6e712..d5f9a00afda 100644 --- a/docs/source/telegram.webhookinfo.rst +++ b/docs/source/telegram.webhookinfo.rst @@ -1,4 +1,4 @@ -:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/master/telegram/webhookinfo.py +:github_url: https://github.com/python-telegram-bot/python-telegram-bot/blob/v13.x/telegram/webhookinfo.py telegram.WebhookInfo ==================== diff --git a/requirements.txt b/requirements.txt index 967fd782804..6492c9a1e5c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,7 +2,7 @@ # pre-commit hooks for pylint & mypy certifi # only telegram.ext: # Keep this line here; used in setup(-raw).py -tornado>=6.1 +tornado==6.1 APScheduler==3.6.3 pytz>=2018.6 cachetools==4.2.2 diff --git a/setup.cfg b/setup.cfg index ecfc17fad34..0873e46c17e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -30,6 +30,7 @@ filterwarnings = ; Unfortunately due to https://github.com/pytest-dev/pytest/issues/8343 we can't have this here ; and instead do a trick directly in tests/conftest.py ; ignore::telegram.utils.deprecate.TelegramDeprecationWarning +markers = dev: If you want to test a specific test, use this [coverage:run] branch = True diff --git a/setup.py b/setup.py index f4fced0de76..ee5b51e0807 100644 --- a/setup.py +++ b/setup.py @@ -102,7 +102,7 @@ def get_setup_kwargs(raw=False): 'Programming Language :: Python :: 3.8', 'Programming Language :: Python :: 3.9', ], - python_requires='>=3.6' + python_requires='>=3.7' ) return kwargs diff --git a/telegram/__main__.py b/telegram/__main__.py index 2e7a7de1d96..fbb378c8be0 100644 --- a/telegram/__main__.py +++ b/telegram/__main__.py @@ -41,7 +41,7 @@ def print_ver_info() -> None: # skipcq: PY-D0003 git_revision = _git_revision() print(f'python-telegram-bot {telegram_ver}' + (f' ({git_revision})' if git_revision else '')) print(f'Bot API {BOT_API_VERSION}') - print(f'certifi {certifi.__version__}') # type: ignore[attr-defined] + print('certifi' + certifi.__version__) sys_version = sys.version.replace('\n', ' ') print(f'Python {sys_version}') diff --git a/telegram/bot.py b/telegram/bot.py index b37781bd412..39976c4432c 100644 --- a/telegram/bot.py +++ b/telegram/bot.py @@ -2429,8 +2429,8 @@ def get_file( if result.get('file_path') and not is_local_file( # type: ignore[union-attr] result['file_path'] # type: ignore[index] ): - result['file_path'] = '{}/{}'.format( # type: ignore[index] - self.base_file_url, result['file_path'] # type: ignore[index] + result['file_path'] = ( # type: ignore[index] + f"{self.base_file_url}/" f"{result['file_path']}" # type: ignore[index] ) return File.de_json(result, self) # type: ignore[return-value, arg-type] @@ -3080,6 +3080,7 @@ def set_webhook( api_kwargs: JSONDict = None, ip_address: str = None, drop_pending_updates: bool = None, + secret_token: str = None, ) -> bool: """ Use this method to specify a url and receive incoming updates via an outgoing webhook. @@ -3087,9 +3088,9 @@ def set_webhook( specified url, containing a JSON-serialized Update. In case of an unsuccessful request, Telegram will give up after a reasonable amount of attempts. - If you'd like to make sure that the Webhook request comes from Telegram, Telegram - recommends using a secret path in the URL, e.g. https://www.example.com/. Since - nobody else knows your bot's token, you can be pretty sure it's us. + If you'd like to make sure that the Webhook was set by you, you can specify secret data in + the parameter ``secret_token``. If specified, the request will contain a header + ``X-Telegram-Bot-Api-Secret-Token`` with the secret token as content. Note: The certificate argument should be a file from disk ``open(filename, 'rb')``. @@ -3117,6 +3118,12 @@ def set_webhook( a short period of time. drop_pending_updates (:obj:`bool`, optional): Pass :obj:`True` to drop all pending updates. + secret_token (:obj:`str`, optional): A secret token to be sent in a header + ``X-Telegram-Bot-Api-Secret-Token`` in every webhook request, 1-256 characters. + Only characters ``A-Z``, ``a-z``, ``0-9``, ``_`` and ``-`` are allowed. + The header is useful to ensure that the request comes from a webhook set by you. + + .. versionadded:: 13.13 timeout (:obj:`int` | :obj:`float`, optional): If this value is specified, use it as the read timeout from the server (instead of the one specified during creation of the connection pool). @@ -3157,6 +3164,8 @@ def set_webhook( data['ip_address'] = ip_address if drop_pending_updates: data['drop_pending_updates'] = drop_pending_updates + if secret_token is not None: + data["secret_token"] = secret_token result = self._post('setWebhook', data, timeout=timeout, api_kwargs=api_kwargs) @@ -4804,6 +4813,37 @@ def get_sticker_set( return StickerSet.de_json(result, self) # type: ignore[return-value, arg-type] + @log + def get_custom_emoji_stickers( + self, + custom_emoji_ids: List[str], + *, + timeout: ODVInput[float] = DEFAULT_NONE, + api_kwargs: JSONDict = None, + ) -> List[Sticker]: + """ + Use this method to get information about emoji stickers by their identifiers. + + .. versionadded:: 13.14 + + Args: + custom_emoji_ids (List[:obj:`str`]): List of custom emoji identifiers. + At most 200 custom emoji identifiers can be specified. + Keyword Args: + timeout (:obj:`int` | :obj:`float`, optional): If this value is specified, use it as + the read timeout from the server (instead of the one specified during + creation of the connection pool). + api_kwargs (:obj:`dict`, optional): Arbitrary keyword arguments to be passed to the + Telegram API. + Returns: + List[:class:`telegram.Sticker`] + Raises: + :class:`telegram.error.TelegramError` + """ + data: JSONDict = {"custom_emoji_ids": custom_emoji_ids} + result = self._post("getCustomEmojiStickers", data, timeout=timeout, api_kwargs=api_kwargs) + return Sticker.de_list(result, self) # type: ignore[return-value, arg-type] + @log def upload_sticker_file( self, @@ -4862,6 +4902,7 @@ def create_new_sticker_set( tgs_sticker: FileInput = None, api_kwargs: JSONDict = None, webm_sticker: FileInput = None, + sticker_type: str = None, ) -> bool: """ Use this method to create new sticker set owned by a user. @@ -4878,6 +4919,10 @@ def create_new_sticker_set( The png_sticker and tgs_sticker argument can be either a file_id, an URL or a file from disk ``open(filename, 'rb')`` + .. versionchanged:: 13.14 + The parameter ``contains_masks`` has been depreciated as of Bot API 6.2. + Use ``sticker_type`` instead. + Args: user_id (:obj:`int`): User identifier of created sticker set owner. name (:obj:`str`): Short name of sticker set, to be used in t.me/addstickers/ URLs @@ -4915,6 +4960,12 @@ def create_new_sticker_set( should be created. mask_position (:class:`telegram.MaskPosition`, optional): Position where the mask should be placed on faces. + sticker_type (:obj:`str`, optional): Type of stickers in the set, pass + :attr:`telegram.Sticker.REGULAR` or :attr:`telegram.Sticker.MASK`. Custom emoji + sticker sets can't be created via the Bot API at the moment. By default, a + regular sticker set is created. + + .. versionadded:: 13.14 timeout (:obj:`int` | :obj:`float`, optional): If this value is specified, use it as the read timeout from the server (instead of the one specified during creation of the connection pool). @@ -4942,7 +4993,8 @@ def create_new_sticker_set( # We need to_json() instead of to_dict() here, because we're sending a media # message here, which isn't json dumped by utils.request data['mask_position'] = mask_position.to_json() - + if sticker_type is not None: + data['sticker_type'] = sticker_type result = self._post('createNewStickerSet', data, timeout=timeout, api_kwargs=api_kwargs) return result # type: ignore[return-value] @@ -5914,6 +5966,135 @@ def get_chat_menu_button( ) return MenuButton.de_json(result, bot=self) # type: ignore[return-value, arg-type] + @log + def create_invoice_link( + self, + title: str, + description: str, + payload: str, + provider_token: str, + currency: str, + prices: List["LabeledPrice"], + max_tip_amount: int = None, + suggested_tip_amounts: List[int] = None, + provider_data: Union[str, object] = None, + photo_url: str = None, + photo_size: int = None, + photo_width: int = None, + photo_height: int = None, + need_name: bool = None, + need_phone_number: bool = None, + need_email: bool = None, + need_shipping_address: bool = None, + send_phone_number_to_provider: bool = None, + send_email_to_provider: bool = None, + is_flexible: bool = None, + timeout: ODVInput[float] = DEFAULT_NONE, + api_kwargs: JSONDict = None, + ) -> str: + """Use this method to create a link for an invoice. + + .. versionadded:: 13.13 + + Args: + title (:obj:`str`): Product name. 1-32 characters. + description (:obj:`str`): Product description. 1-255 characters. + payload (:obj:`str`): Bot-defined invoice payload. 1-128 bytes. This will not be + displayed to the user, use for your internal processes. + provider_token (:obj:`str`): Payments provider token, obtained via + `@BotFather `_. + currency (:obj:`str`): Three-letter ISO 4217 currency code, see `more on currencies + `_. + prices (List[:class:`telegram.LabeledPrice`)]: Price breakdown, a list + of components (e.g. product price, tax, discount, delivery cost, delivery tax, + bonus, etc.). + max_tip_amount (:obj:`int`, optional): The maximum accepted amount for tips in the + *smallest* units of the currency (integer, **not** float/double). For example, for + a maximum tip of US$ 1.45 pass ``max_tip_amount = 145``. See the exp parameter in + `currencies.json `_, it + shows the number of digits past the decimal point for each currency (2 for the + majority of currencies). Defaults to ``0``. + suggested_tip_amounts (List[:obj:`int`], optional): An array of + suggested amounts of tips in the *smallest* units of the currency (integer, **not** + float/double). At most 4 suggested tip amounts can be specified. The suggested tip + amounts must be positive, passed in a strictly increased order and must not exceed + ``max_tip_amount``. + provider_data (:obj:`str` | :obj:`object`, optional): Data about the + invoice, which will be shared with the payment provider. A detailed description of + required fields should be provided by the payment provider. When an object is + passed, it will be encoded as JSON. + photo_url (:obj:`str`, optional): URL of the product photo for the invoice. Can be a + photo of the goods or a marketing image for a service. + photo_size (:obj:`int`, optional): Photo size in bytes. + photo_width (:obj:`int`, optional): Photo width. + photo_height (:obj:`int`, optional): Photo height. + need_name (:obj:`bool`, optional): Pass :obj:`True`, if you require the user's full + name to complete the order. + need_phone_number (:obj:`bool`, optional): Pass :obj:`True`, if you require the user's + phone number to complete the order. + need_email (:obj:`bool`, optional): Pass :obj:`True`, if you require the user's email + address to complete the order. + need_shipping_address (:obj:`bool`, optional): Pass :obj:`True`, if you require the + user's shipping address to complete the order. + send_phone_number_to_provider (:obj:`bool`, optional): Pass :obj:`True`, if user's + phone number should be sent to provider. + send_email_to_provider (:obj:`bool`, optional): Pass :obj:`True`, if user's email + address should be sent to provider. + is_flexible (:obj:`bool`, optional): Pass :obj:`True`, if the final price depends on + the shipping method. + timeout (:obj:`int` | :obj:`float`, optional): If this value is specified, use it as + the read timeout from the server (instead of the one specified during creation of + the connection pool). + api_kwargs (:obj:`dict`, optional): Arbitrary keyword arguments to be passed to the + Telegram API. + + Returns: + :class:`str`: On success, the created invoice link is returned. + """ + data: JSONDict = { + "title": title, + "description": description, + "payload": payload, + "provider_token": provider_token, + "currency": currency, + "prices": [p.to_dict() for p in prices], + } + if max_tip_amount is not None: + data["max_tip_amount"] = max_tip_amount + if suggested_tip_amounts is not None: + data["suggested_tip_amounts"] = suggested_tip_amounts + if provider_data is not None: + data["provider_data"] = provider_data + if photo_url is not None: + data["photo_url"] = photo_url + if photo_size is not None: + data["photo_size"] = photo_size + if photo_width is not None: + data["photo_width"] = photo_width + if photo_height is not None: + data["photo_height"] = photo_height + if need_name is not None: + data["need_name"] = need_name + if need_phone_number is not None: + data["need_phone_number"] = need_phone_number + if need_email is not None: + data["need_email"] = need_email + if need_shipping_address is not None: + data["need_shipping_address"] = need_shipping_address + if is_flexible is not None: + data["is_flexible"] = is_flexible + if send_phone_number_to_provider is not None: + data["send_phone_number_to_provider"] = send_phone_number_to_provider + if send_email_to_provider is not None: + data["send_email_to_provider"] = send_email_to_provider + + return self._post( # type: ignore[return-value] + "createInvoiceLink", + data, + timeout=timeout, + api_kwargs=api_kwargs, + ) + def to_dict(self) -> JSONDict: """See :meth:`telegram.TelegramObject.to_dict`.""" data: JSONDict = {'id': self.id, 'username': self.username, 'first_name': self.first_name} @@ -6068,6 +6249,8 @@ def __hash__(self) -> int: """Alias for :meth:`unpin_all_chat_messages`""" getStickerSet = get_sticker_set """Alias for :meth:`get_sticker_set`""" + getCustomEmojiStickers = get_custom_emoji_stickers + """Alias for :meth:`get_custom_emoji_stickers`""" uploadStickerFile = upload_sticker_file """Alias for :meth:`upload_sticker_file`""" createNewStickerSet = create_new_sticker_set @@ -6106,3 +6289,5 @@ def __hash__(self) -> int: """Alias for :meth:`get_my_default_administrator_rights`""" setMyDefaultAdministratorRights = set_my_default_administrator_rights """Alias for :meth:`set_my_default_administrator_rights`""" + createInvoiceLink = create_invoice_link + """Alias for :meth:`create_invoice_link`""" diff --git a/telegram/chat.py b/telegram/chat.py index 7de0e73929a..3d6e8178870 100644 --- a/telegram/chat.py +++ b/telegram/chat.py @@ -116,6 +116,21 @@ class Chat(TelegramObject): chats. Returned only in :meth:`telegram.Bot.get_chat`. location (:class:`telegram.ChatLocation`, optional): For supergroups, the location to which the supergroup is connected. Returned only in :meth:`telegram.Bot.get_chat`. + join_to_send_messages (:obj:`bool`, optional): :obj:`True`, if users need to join the + supergroup before they can send messages. Returned only in + :meth:`telegram.Bot.get_chat`. + + .. versionadded:: 13.13 + join_by_request (:obj:`bool`, optional): :obj:`True`, if all users directly joining the + supergroup need to be approved by supergroup administrators. Returned only in + :meth:`telegram.Bot.get_chat`. + + .. versionadded:: 13.13 + has_restricted_voice_and_video_messages (:obj:`bool`, optional): :obj:`True`, if the + privacy settings of the other party restrict sending voice and video note messages + in the private chat. Returned only in :meth:`telegram.Bot.get_chat`. + + .. versionadded:: 13.14 **kwargs (:obj:`dict`): Arbitrary keyword arguments. Attributes: @@ -160,7 +175,21 @@ class Chat(TelegramObject): chats. Returned only in :meth:`telegram.Bot.get_chat`. location (:class:`telegram.ChatLocation`): Optional. For supergroups, the location to which the supergroup is connected. Returned only in :meth:`telegram.Bot.get_chat`. + join_to_send_messages (:obj:`bool`): Optional. :obj:`True`, if users need to join the + supergroup before they can send messages. Returned only in + :meth:`telegram.Bot.get_chat`. + + .. versionadded:: 13.13 + join_by_request (:obj:`bool`): Optional. :obj:`True`, if all users directly joining the + supergroup need to be approved by supergroup administrators. Returned only in + :meth:`telegram.Bot.get_chat`. + + .. versionadded:: 13.13 + has_restricted_voice_and_video_messages (:obj:`bool`): Optional. :obj:`True`, if the + privacy settings of the other party restrict sending voice and video note messages + in the private chat. Returned only in :meth:`telegram.Bot.get_chat`. + .. versionadded:: 13.14 """ __slots__ = ( @@ -186,6 +215,9 @@ class Chat(TelegramObject): 'message_auto_delete_time', 'has_protected_content', 'has_private_forwards', + 'join_to_send_messages', + 'join_by_request', + 'has_restricted_voice_and_video_messages', '_id_attrs', ) @@ -226,6 +258,9 @@ def __init__( message_auto_delete_time: int = None, has_private_forwards: bool = None, has_protected_content: bool = None, + join_to_send_messages: bool = None, + join_by_request: bool = None, + has_restricted_voice_and_video_messages: bool = None, **_kwargs: Any, ): # Required @@ -254,6 +289,9 @@ def __init__( self.can_set_sticker_set = can_set_sticker_set self.linked_chat_id = linked_chat_id self.location = location + self.join_to_send_messages = join_to_send_messages + self.join_by_request = join_by_request + self.has_restricted_voice_and_video_messages = has_restricted_voice_and_video_messages self.bot = bot self._id_attrs = (self.id,) diff --git a/telegram/constants.py b/telegram/constants.py index c8ac8afa1c0..ae5175d9d2f 100644 --- a/telegram/constants.py +++ b/telegram/constants.py @@ -21,7 +21,7 @@ `Telegram Bots API `_. Attributes: - BOT_API_VERSION (:obj:`str`): `6.0`. Telegram Bot API version supported by this + BOT_API_VERSION (:obj:`str`): `6.2`. Telegram Bot API version supported by this version of `python-telegram-bot`. Also available as ``telegram.bot_api_version``. .. versionadded:: 13.4 @@ -144,6 +144,9 @@ MESSAGEENTITY_SPOILER (:obj:`str`): ``'spoiler'`` .. versionadded:: 13.10 + MESSAGEENTITY_CUSTOM_EMOJI (:obj:`str`): ``'custom_emoji'`` + + .. versionadded:: 13.14 MESSAGEENTITY_ALL_TYPES (List[:obj:`str`]): List of all the types of message entity. :class:`telegram.ParseMode`: @@ -160,6 +163,19 @@ POLL_QUIZ (:obj:`str`): ``'quiz'`` MAX_POLL_QUESTION_LENGTH (:obj:`int`): 300 MAX_POLL_OPTION_LENGTH (:obj:`int`): 100 +:class:`telegram.Sticker`: + +Attributes: + + STICKER_REGULAR (:obj:`str`)= ``'regular'`` + + .. versionadded:: 13.14 + STICKER_MASK (:obj:`str`) = ``'mask'`` + + .. versionadded:: 13.14 + STICKER_CUSTOM_EMOJI (:obj:`str`) = ``'custom_emoji'`` + + .. versionadded:: 13.14 :class:`telegram.MaskPosition`: @@ -247,7 +263,7 @@ """ from typing import List -BOT_API_VERSION: str = '6.0' +BOT_API_VERSION: str = '6.2' MAX_MESSAGE_LENGTH: int = 4096 MAX_CAPTION_LENGTH: int = 1024 ANONYMOUS_ADMIN_ID: int = 1087968824 @@ -325,6 +341,7 @@ MESSAGEENTITY_UNDERLINE: str = 'underline' MESSAGEENTITY_STRIKETHROUGH: str = 'strikethrough' MESSAGEENTITY_SPOILER: str = 'spoiler' +MESSAGEENTITY_CUSTOM_EMOJI: str = 'custom_emoji' MESSAGEENTITY_ALL_TYPES: List[str] = [ MESSAGEENTITY_MENTION, MESSAGEENTITY_HASHTAG, @@ -342,6 +359,7 @@ MESSAGEENTITY_UNDERLINE, MESSAGEENTITY_STRIKETHROUGH, MESSAGEENTITY_SPOILER, + MESSAGEENTITY_CUSTOM_EMOJI, ] PARSEMODE_MARKDOWN: str = 'Markdown' @@ -353,6 +371,10 @@ MAX_POLL_QUESTION_LENGTH: int = 300 MAX_POLL_OPTION_LENGTH: int = 100 +STICKER_REGULAR: str = "regular" +STICKER_MASK: str = "mask" +STICKER_CUSTOM_EMOJI: str = "custom_emoji" + STICKER_FOREHEAD: str = 'forehead' STICKER_EYES: str = 'eyes' STICKER_MOUTH: str = 'mouth' diff --git a/telegram/error.py b/telegram/error.py index 3cf41d5879f..d0b72a2e66a 100644 --- a/telegram/error.py +++ b/telegram/error.py @@ -56,7 +56,7 @@ def __init__(self, message: str): self.message = msg def __str__(self) -> str: - return '%s' % self.message + return f'{self.message}' def __reduce__(self) -> Tuple[type, Tuple[str]]: return self.__class__, (self.message,) diff --git a/telegram/ext/filters.py b/telegram/ext/filters.py index e7d2a24cea0..cdf0e53029c 100644 --- a/telegram/ext/filters.py +++ b/telegram/ext/filters.py @@ -1004,6 +1004,38 @@ def filter(self, message: Message) -> bool: location = _Location() """Messages that contain :class:`telegram.Location`.""" + class _UserAttachment(UpdateFilter): + __slots__ = () + name = "Filters.user_attachment" + + def filter(self, update: Update) -> bool: + return bool(update.effective_user) and bool( + update.effective_user.added_to_attachment_menu + ) + + user_attachment = _UserAttachment() + """This filter filters *any* message that have a user who added the bot to their + :attr:`attachment menu ` as + :attr:`telegram.Update.effective_user`. + + .. versionadded:: 13.13 + """ + + class _UserPremium(UpdateFilter): + __slots__ = () + name = "Filters.premium_user" + + def filter(self, update: Update) -> bool: + return bool(update.effective_user) and bool(update.effective_user.is_premium) + + premium_user = _UserPremium() + """This filter filters *any* message from a + :attr:`Telegram Premium user ` as + :attr:`telegram.Update.effective_user`. + + .. versionadded:: 13.13 + """ + class _Venue(MessageFilter): __slots__ = () name = 'Filters.venue' diff --git a/telegram/ext/updater.py b/telegram/ext/updater.py index b2c05125691..b1372b6c142 100644 --- a/telegram/ext/updater.py +++ b/telegram/ext/updater.py @@ -463,6 +463,11 @@ def start_webhook( application. Else, the webhook will be started on https://listen:port/url_path. Also calls :meth:`telegram.Bot.set_webhook` as required. + Note: + ``telegram.Bot.set_webhook.secret_token`` is not checked by this webhook + implementation. If you want to use this new security parameter, either build your own + webhook server or update your code to version 20.0a2+. + .. versionchanged:: 13.4 :meth:`start_webhook` now *always* calls :meth:`telegram.Bot.set_webhook`, so pass ``webhook_url`` instead of calling ``updater.bot.set_webhook(webhook_url)`` manually. diff --git a/telegram/files/sticker.py b/telegram/files/sticker.py index e3f22a99754..a461bff5d88 100644 --- a/telegram/files/sticker.py +++ b/telegram/files/sticker.py @@ -51,6 +51,11 @@ class Sticker(TelegramObject): is_video (:obj:`bool`): :obj:`True`, if the sticker is a video sticker. .. versionadded:: 13.11 + type (:obj:`str`): Type of the sticker. Currently one of :attr:`REGULAR`, + :attr:`MASK`, :attr:`CUSTOM_EMOJI`. The type of the sticker is independent from its + format, which is determined by the fields :attr:`is_animated` and :attr:`is_video`. + + .. versionadded:: 13.14 thumb (:class:`telegram.PhotoSize`, optional): Sticker thumbnail in the .WEBP or .JPG format. emoji (:obj:`str`, optional): Emoji associated with the sticker @@ -60,6 +65,14 @@ class Sticker(TelegramObject): position where the mask should be placed. file_size (:obj:`int`, optional): File size. bot (:class:`telegram.Bot`, optional): The Bot to use for instance methods. + premium_animation (:class:`telegram.File`, optional): For premium regular stickers, + premium animation for the sticker. + + .. versionadded:: 13.13 + custom_emoji (:obj:`str`, optional): For custom emoji stickers, unique identifier of the + custom emoji. + + .. versionadded:: 13.14 **kwargs (obj:`dict`): Arbitrary keyword arguments. Attributes: @@ -73,6 +86,11 @@ class Sticker(TelegramObject): is_video (:obj:`bool`): :obj:`True`, if the sticker is a video sticker. .. versionadded:: 13.11 + type (:obj:`str`): Type of the sticker. Currently one of :attr:`REGULAR`, + :attr:`MASK`, :attr:`CUSTOM_EMOJI`. The type of the sticker is independent from its + format, which is determined by the fields :attr:`is_animated` and :attr:`is_video`. + + .. versionadded:: 13.14 thumb (:class:`telegram.PhotoSize`): Optional. Sticker thumbnail in the .webp or .jpg format. emoji (:obj:`str`): Optional. Emoji associated with the sticker. @@ -80,6 +98,14 @@ class Sticker(TelegramObject): mask_position (:class:`telegram.MaskPosition`): Optional. For mask stickers, the position where the mask should be placed. file_size (:obj:`int`): Optional. File size. + premium_animation (:class:`telegram.File`): Optional. For premium regular stickers, + premium animation for the sticker. + + .. versionadded:: 13.13 + custom_emoji (:obj:`str`): Optional. For custom emoji stickers, unique identifier of the + custom emoji. + + .. versionadded:: 13.14 bot (:class:`telegram.Bot`): Optional. The Bot to use for instance methods. """ @@ -97,6 +123,9 @@ class Sticker(TelegramObject): 'height', 'file_unique_id', 'emoji', + 'premium_animation', + 'type', + 'custom_emoji_id', '_id_attrs', ) @@ -108,12 +137,15 @@ def __init__( height: int, is_animated: bool, is_video: bool, + type: str, # pylint: disable=redefined-builtin thumb: PhotoSize = None, emoji: str = None, file_size: int = None, set_name: str = None, mask_position: 'MaskPosition' = None, bot: 'Bot' = None, + premium_animation: 'File' = None, + custom_emoji_id: str = None, **_kwargs: Any, ): # Required @@ -123,6 +155,7 @@ def __init__( self.height = int(height) self.is_animated = is_animated self.is_video = is_video + self.type = type # Optionals self.thumb = thumb self.emoji = emoji @@ -130,12 +163,18 @@ def __init__( self.set_name = set_name self.mask_position = mask_position self.bot = bot + self.premium_animation = premium_animation + self.custom_emoji_id = custom_emoji_id self._id_attrs = (self.file_unique_id,) @classmethod def de_json(cls, data: Optional[JSONDict], bot: 'Bot') -> Optional['Sticker']: """See :meth:`telegram.TelegramObject.de_json`.""" + # needs to be here to avoid circular imports + # pylint: disable=import-outside-toplevel + from telegram import File + data = cls._parse_data(data) if not data: @@ -143,6 +182,7 @@ def de_json(cls, data: Optional[JSONDict], bot: 'Bot') -> Optional['Sticker']: data['thumb'] = PhotoSize.de_json(data.get('thumb'), bot) data['mask_position'] = MaskPosition.de_json(data.get('mask_position'), bot) + data["premium_animation"] = File.de_json(data.get("premium_animation"), bot) return cls(bot=bot, **data) @@ -162,6 +202,22 @@ def get_file( """ return self.bot.get_file(file_id=self.file_id, timeout=timeout, api_kwargs=api_kwargs) + REGULAR: ClassVar[str] = constants.STICKER_REGULAR + """:const:`telegram.constants.STICKER_REGULAR` + + .. versionadded:: 13.14 + """ + MASK: ClassVar[str] = constants.STICKER_MASK + """:const:`telegram.constants.STICKER_MASK` + + .. versionadded:: 13.14 + """ + CUSTOM_EMOJI: ClassVar[str] = constants.STICKER_CUSTOM_EMOJI + """:const:`telegram.constants.STICKER_CUSTOM_EMOJI` + + .. versionadded:: 13.14 + """ + class StickerSet(TelegramObject): """This object represents a sticker set. @@ -174,6 +230,10 @@ class StickerSet(TelegramObject): arguments had to be changed. Use keyword arguments to make sure that the arguments are passed correctly. + .. versionchanged:: 13.14: + The parameter ``contains_masks`` has been depreciated as of Bot API 6.2. + Use ``sticker_type`` instead. + Args: name (:obj:`str`): Sticker set name. title (:obj:`str`): Sticker set title. @@ -183,6 +243,11 @@ class StickerSet(TelegramObject): .. versionadded:: 13.11 contains_masks (:obj:`bool`): :obj:`True`, if the sticker set contains masks. stickers (List[:class:`telegram.Sticker`]): List of all set stickers. + sticker_type (:obj:`str`, optional): Type of stickers in the set, currently one of + :attr:`telegram.Sticker.REGULAR`, :attr:`telegram.Sticker.MASK`, + :attr:`telegram.Sticker.CUSTOM_EMOJI`. + + .. versionadded:: 13.14 thumb (:class:`telegram.PhotoSize`, optional): Sticker set thumbnail in the ``.WEBP``, ``.TGS``, or ``.WEBM`` format. @@ -195,6 +260,9 @@ class StickerSet(TelegramObject): .. versionadded:: 13.11 contains_masks (:obj:`bool`): :obj:`True`, if the sticker set contains masks. stickers (List[:class:`telegram.Sticker`]): List of all set stickers. + sticker_type (:obj:`str`): Optional. Type of stickers in the set. + + .. versionadded:: 13.14 thumb (:class:`telegram.PhotoSize`): Optional. Sticker set thumbnail in the ``.WEBP``, ``.TGS`` or ``.WEBM`` format. @@ -208,6 +276,7 @@ class StickerSet(TelegramObject): 'title', 'stickers', 'name', + 'sticker_type', '_id_attrs', ) @@ -220,6 +289,7 @@ def __init__( stickers: List[Sticker], is_video: bool, thumb: PhotoSize = None, + sticker_type: str = None, **_kwargs: Any, ): self.name = name @@ -230,6 +300,7 @@ def __init__( self.stickers = stickers # Optionals self.thumb = thumb + self.sticker_type = sticker_type self._id_attrs = (self.name,) diff --git a/telegram/loginurl.py b/telegram/loginurl.py index 7d6dc561e51..51a006c825e 100644 --- a/telegram/loginurl.py +++ b/telegram/loginurl.py @@ -40,7 +40,7 @@ class LoginUrl(TelegramObject): `Checking authorization `_ Args: - url (:obj:`str`): An HTTP URL to be opened with user authorization data added to the query + url (:obj:`str`): An HTTPS URL to be opened with user authorization data added to the query string when the button is pressed. If the user refuses to provide authorization data, the original URL without information about the user will be opened. The data added is the same as described in @@ -60,7 +60,7 @@ class LoginUrl(TelegramObject): for your bot to send messages to the user. Attributes: - url (:obj:`str`): An HTTP URL to be opened with user authorization data. + url (:obj:`str`): An HTTPS URL to be opened with user authorization data. forward_text (:obj:`str`): Optional. New text of the button in forwarded messages. bot_username (:obj:`str`): Optional. Username of a bot, which will be used for user authorization. diff --git a/telegram/message.py b/telegram/message.py index 2d0f29d1202..951b16a9dd0 100644 --- a/telegram/message.py +++ b/telegram/message.py @@ -407,6 +407,8 @@ class Message(TelegramObject): to the message. bot (:class:`telegram.Bot`): Optional. The Bot to use for instance methods. + .. |custom_emoji_formatting_note| replace:: Custom emoji entities will currently be ignored + by this function. Instead, the supplied replacement for the emoji will be used. """ # fmt: on @@ -2752,6 +2754,9 @@ def text_html(self) -> str: Use this if you want to retrieve the message text with the entities formatted as HTML in the same way the original message was formatted. + Note: + |custom_emoji_formatting_note| + .. versionchanged:: 13.10 Spoiler entities are now formatted as HTML. @@ -2768,6 +2773,9 @@ def text_html_urled(self) -> str: Use this if you want to retrieve the message text with the entities formatted as HTML. This also formats :attr:`telegram.MessageEntity.URL` as a hyperlink. + Note: + |custom_emoji_formatting_note| + .. versionchanged:: 13.10 Spoiler entities are now formatted as HTML. @@ -2785,6 +2793,9 @@ def caption_html(self) -> str: Use this if you want to retrieve the message caption with the caption entities formatted as HTML in the same way the original message was formatted. + Note: + |custom_emoji_formatting_note| + .. versionchanged:: 13.10 Spoiler entities are now formatted as HTML. @@ -2801,6 +2812,9 @@ def caption_html_urled(self) -> str: Use this if you want to retrieve the message caption with the caption entities formatted as HTML. This also formats :attr:`telegram.MessageEntity.URL` as a hyperlink. + Note: + |custom_emoji_formatting_note| + .. versionchanged:: 13.10 Spoiler entities are now formatted as HTML. @@ -2983,8 +2997,10 @@ def text_markdown(self) -> str: in the same way the original message was formatted. Note: - :attr:`telegram.ParseMode.MARKDOWN` is is a legacy mode, retained by Telegram for - backward compatibility. You should use :meth:`text_markdown_v2` instead. + * :attr:`telegram.ParseMode.MARKDOWN` is a legacy mode, retained by Telegram for + backward compatibility. You should use :meth:`text_markdown_v2` instead. + + * |custom_emoji_formatting_note| Returns: :obj:`str`: Message text with entities formatted as Markdown. @@ -3004,6 +3020,9 @@ def text_markdown_v2(self) -> str: Use this if you want to retrieve the message text with the entities formatted as Markdown in the same way the original message was formatted. + Note: + |custom_emoji_formatting_note| + .. versionchanged:: 13.10 Spoiler entities are now formatted as Markdown V2. @@ -3021,8 +3040,10 @@ def text_markdown_urled(self) -> str: This also formats :attr:`telegram.MessageEntity.URL` as a hyperlink. Note: - :attr:`telegram.ParseMode.MARKDOWN` is is a legacy mode, retained by Telegram for - backward compatibility. You should use :meth:`text_markdown_v2_urled` instead. + * :attr:`telegram.ParseMode.MARKDOWN` is a legacy mode, retained by Telegram for + backward compatibility. You should use :meth:`text_markdown_v2_urled` instead. + + * |custom_emoji_formatting_note| Returns: :obj:`str`: Message text with entities formatted as Markdown. @@ -3042,6 +3063,9 @@ def text_markdown_v2_urled(self) -> str: Use this if you want to retrieve the message text with the entities formatted as Markdown. This also formats :attr:`telegram.MessageEntity.URL` as a hyperlink. + Note: + |custom_emoji_formatting_note| + .. versionchanged:: 13.10 Spoiler entities are now formatted as Markdown V2. @@ -3059,8 +3083,10 @@ def caption_markdown(self) -> str: Markdown in the same way the original message was formatted. Note: - :attr:`telegram.ParseMode.MARKDOWN` is is a legacy mode, retained by Telegram for - backward compatibility. You should use :meth:`caption_markdown_v2` instead. + * :attr:`telegram.ParseMode.MARKDOWN` is a legacy mode, retained by Telegram for + backward compatibility. You should use :meth:`caption_markdown_v2` instead. + + * |custom_emoji_formatting_note| Returns: :obj:`str`: Message caption with caption entities formatted as Markdown. @@ -3080,6 +3106,9 @@ def caption_markdown_v2(self) -> str: Use this if you want to retrieve the message caption with the caption entities formatted as Markdown in the same way the original message was formatted. + Note: + |custom_emoji_formatting_note| + .. versionchanged:: 13.10 Spoiler entities are now formatted as Markdown V2. @@ -3099,8 +3128,10 @@ def caption_markdown_urled(self) -> str: Markdown. This also formats :attr:`telegram.MessageEntity.URL` as a hyperlink. Note: - :attr:`telegram.ParseMode.MARKDOWN` is is a legacy mode, retained by Telegram for - backward compatibility. You should use :meth:`caption_markdown_v2_urled` instead. + * :attr:`telegram.ParseMode.MARKDOWN` is a legacy mode, retained by Telegram for + backward compatibility. You should use :meth:`caption_markdown_v2_urled` instead. + + * |custom_emoji_formatting_note| Returns: :obj:`str`: Message caption with caption entities formatted as Markdown. @@ -3120,6 +3151,9 @@ def caption_markdown_v2_urled(self) -> str: Use this if you want to retrieve the message caption with the caption entities formatted as Markdown. This also formats :attr:`telegram.MessageEntity.URL` as a hyperlink. + Note: + |custom_emoji_formatting_note| + .. versionchanged:: 13.10 Spoiler entities are now formatted as Markdown V2. diff --git a/telegram/messageentity.py b/telegram/messageentity.py index d4e162044d6..ac90735c4fa 100644 --- a/telegram/messageentity.py +++ b/telegram/messageentity.py @@ -40,7 +40,10 @@ class MessageEntity(TelegramObject): bot_command, url, email, phone_number, bold (bold text), italic (italic text), strikethrough, spoiler (spoiler message), code (monowidth string), pre (monowidth block), text_link (for clickable text URLs), text_mention - (for users without usernames). + (for users without usernames), custom_emoji (for inline custom emoji stickers). + + .. versionadded:: 13.14 + added inline custom emoji offset (:obj:`int`): Offset in UTF-16 code units to the start of the entity. length (:obj:`int`): Length of the entity in UTF-16 code units. url (:obj:`str`, optional): For :attr:`TEXT_LINK` only, url that will be opened after @@ -49,6 +52,11 @@ class MessageEntity(TelegramObject): user. language (:obj:`str`, optional): For :attr:`PRE` only, the programming language of the entity text. + custom_emoji_id (:obj:`str`, optional): For :attr:`CUSTOM_EMOJI` only, unique identifier + of the custom emoji. Use :meth:`telegram.Bot.get_custom_emoji_stickers` to get full + information about the sticker. + + .. versionadded:: 13.14 Attributes: type (:obj:`str`): Type of the entity. @@ -57,10 +65,22 @@ class MessageEntity(TelegramObject): url (:obj:`str`): Optional. Url that will be opened after user taps on the text. user (:class:`telegram.User`): Optional. The mentioned user. language (:obj:`str`): Optional. Programming language of the entity text. + custom_emoji_id (:obj:`str`): Optional. Unique identifier of the custom emoji. + + .. versionadded:: 13.14 """ - __slots__ = ('length', 'url', 'user', 'type', 'language', 'offset', '_id_attrs') + __slots__ = ( + 'length', + 'url', + 'user', + 'type', + 'language', + 'offset', + 'custom_emoji_id', + '_id_attrs', + ) def __init__( self, @@ -70,6 +90,7 @@ def __init__( url: str = None, user: User = None, language: str = None, + custom_emoji_id: str = None, **_kwargs: Any, ): # Required @@ -80,6 +101,7 @@ def __init__( self.url = url self.user = user self.language = language + self.custom_emoji_id = custom_emoji_id self._id_attrs = (self.type, self.offset, self.length) @@ -130,6 +152,11 @@ def de_json(cls, data: Optional[JSONDict], bot: 'Bot') -> Optional['MessageEntit .. versionadded:: 13.10 """ + CUSTOM_EMOJI: ClassVar[str] = constants.MESSAGEENTITY_CUSTOM_EMOJI + """:const:`telegram.constants.MESSAGEENTITY_CUSTOM_EMOJI` + + .. versionadded:: 13.14 + """ ALL_TYPES: ClassVar[List[str]] = constants.MESSAGEENTITY_ALL_TYPES """:const:`telegram.constants.MESSAGEENTITY_ALL_TYPES`\n List of all the types""" diff --git a/telegram/user.py b/telegram/user.py index f2e5d87ff7a..3825fe09a51 100644 --- a/telegram/user.py +++ b/telegram/user.py @@ -79,6 +79,13 @@ class User(TelegramObject): supports_inline_queries (:obj:`str`, optional): :obj:`True`, if the bot supports inline queries. Returned only in :attr:`telegram.Bot.get_me` requests. bot (:class:`telegram.Bot`, optional): The Bot to use for instance methods. + is_premium (:obj:`bool`, optional): :obj:`True`, if this user is a Telegram Premium user. + + .. versionadded:: 13.13 + added_to_attachment_menu (:obj:`bool`, optional): :obj:`True`, if this user added + the bot to the attachment menu. + + .. versionadded:: 13.13 Attributes: id (:obj:`int`): Unique identifier for this user or bot. @@ -94,6 +101,14 @@ class User(TelegramObject): supports_inline_queries (:obj:`str`): Optional. :obj:`True`, if the bot supports inline queries. Returned only in :attr:`telegram.Bot.get_me` requests. bot (:class:`telegram.Bot`): Optional. The Bot to use for instance methods. + is_premium (:obj:`bool`): Optional. :obj:`True`, if this user is a Telegram + Premium user. + + .. versionadded:: 13.13 + added_to_attachment_menu (:obj:`bool`): Optional. :obj:`True`, if this user added + the bot to the attachment menu. + + .. versionadded:: 13.13 """ @@ -108,6 +123,8 @@ class User(TelegramObject): 'id', 'bot', 'language_code', + 'is_premium', + 'added_to_attachment_menu', '_id_attrs', ) @@ -123,6 +140,8 @@ def __init__( can_read_all_group_messages: bool = None, supports_inline_queries: bool = None, bot: 'Bot' = None, + is_premium: bool = None, + added_to_attachment_menu: bool = None, **_kwargs: Any, ): # Required @@ -136,6 +155,8 @@ def __init__( self.can_join_groups = can_join_groups self.can_read_all_group_messages = can_read_all_group_messages self.supports_inline_queries = supports_inline_queries + self.is_premium = is_premium + self.added_to_attachment_menu = added_to_attachment_menu self.bot = bot self._id_attrs = (self.id,) diff --git a/telegram/version.py b/telegram/version.py index 565d9766973..df21c5a0b9d 100644 --- a/telegram/version.py +++ b/telegram/version.py @@ -20,5 +20,5 @@ from telegram import constants -__version__ = '13.12' +__version__ = '13.14' bot_api_version = constants.BOT_API_VERSION # pylint: disable=C0103 diff --git a/tests/test_bot.py b/tests/test_bot.py index a1a54363c9a..eeef8a3e82d 100644 --- a/tests/test_bot.py +++ b/tests/test_bot.py @@ -1410,6 +1410,32 @@ def assertion(url, data, *args, **kwargs): assert bot.set_webhook(drop_pending_updates=drop_pending_updates) assert bot.delete_webhook(drop_pending_updates=drop_pending_updates) + def test_set_webhook_params(self, bot, monkeypatch): + # actually making calls to TG is done in + # test_set_webhook_get_webhook_info_and_delete_webhook. Sadly secret_token can't be tested + # there so we have this function \o/ + def make_assertion(*args, **_): + kwargs = args[1] + return ( + kwargs["url"] == "example.com" + and kwargs["max_connections"] == 7 + and kwargs["allowed_updates"] == ["messages"] + and kwargs["ip_address"] == "127.0.0.1" + and kwargs["drop_pending_updates"] + and kwargs["secret_token"] == "SoSecretToken" + ) + + monkeypatch.setattr(bot, "_post", make_assertion) + + assert bot.set_webhook( + "example.com", + max_connections=7, + allowed_updates=["messages"], + ip_address="127.0.0.1", + drop_pending_updates=True, + secret_token="SoSecretToken", + ) + @flaky(3, 1) def test_leave_chat(self, bot): with pytest.raises(BadRequest, match='Chat not found'): @@ -2046,8 +2072,8 @@ def test_pin_and_unpin_message(self, bot, super_group_id): assert bot.unpin_all_chat_messages(super_group_id) # get_sticker_set, upload_sticker_file, create_new_sticker_set, add_sticker_to_set, - # set_sticker_position_in_set and delete_sticker_from_set are tested in the - # test_sticker module. + # set_sticker_position_in_set, delete_sticker_from_set and get_custom_emoji_stickers + # are tested in the test_sticker module. def test_timeout_propagation_explicit(self, monkeypatch, bot, chat_id): diff --git a/tests/test_chat.py b/tests/test_chat.py index e2d56641ad8..bbceb6bb799 100644 --- a/tests/test_chat.py +++ b/tests/test_chat.py @@ -43,6 +43,9 @@ def chat(bot): location=TestChat.location, has_private_forwards=True, has_protected_content=True, + join_to_send_messages=True, + join_by_request=True, + has_restricted_voice_and_video_messages=True, ) @@ -66,6 +69,9 @@ class TestChat: location = ChatLocation(Location(123, 456), 'Barbie World') has_protected_content = True has_private_forwards = True + join_to_send_messages = True + join_by_request = True + has_restricted_voice_and_video_messages = True def test_slot_behaviour(self, chat, recwarn, mro_slots): for attr in chat.__slots__: @@ -92,6 +98,11 @@ def test_de_json(self, bot): 'has_private_forwards': self.has_private_forwards, 'linked_chat_id': self.linked_chat_id, 'location': self.location.to_dict(), + 'join_to_send_messages': self.join_to_send_messages, + 'join_by_request': self.join_by_request, + 'has_restricted_voice_and_video_messages': ( + self.has_restricted_voice_and_video_messages + ), } chat = Chat.de_json(json_dict, bot) @@ -111,6 +122,12 @@ def test_de_json(self, bot): assert chat.linked_chat_id == self.linked_chat_id assert chat.location.location == self.location.location assert chat.location.address == self.location.address + assert chat.join_to_send_messages == self.join_to_send_messages + assert chat.join_by_request == self.join_by_request + assert ( + chat.has_restricted_voice_and_video_messages + == self.has_restricted_voice_and_video_messages + ) def test_to_dict(self, chat): chat_dict = chat.to_dict() @@ -129,6 +146,12 @@ def test_to_dict(self, chat): assert chat_dict['has_protected_content'] == chat.has_protected_content assert chat_dict['linked_chat_id'] == chat.linked_chat_id assert chat_dict['location'] == chat.location.to_dict() + assert chat_dict["join_to_send_messages"] == chat.join_to_send_messages + assert chat_dict["join_by_request"] == chat.join_by_request + assert ( + chat_dict["has_restricted_voice_and_video_messages"] + == chat.has_restricted_voice_and_video_messages + ) def test_link(self, chat): assert chat.link == f'https://t.me/{chat.username}' diff --git a/tests/test_filters.py b/tests/test_filters.py index 7b9904b69ed..9372eb18d38 100644 --- a/tests/test_filters.py +++ b/tests/test_filters.py @@ -1189,6 +1189,19 @@ def test_filters_user_repr(self): with pytest.raises(RuntimeError, match='Cannot set name'): f.name = 'foo' + def test_filters_user_attributes(self, update): + assert not Filters.user_attachment(update) + assert not Filters.premium_user(update) + update.message.from_user.added_to_attachment_menu = True + assert Filters.user_attachment(update) + assert not Filters.premium_user(update) + update.message.from_user.is_premium = True + assert Filters.user_attachment(update) + assert Filters.premium_user(update) + update.message.from_user.added_to_attachment_menu = False + assert not Filters.user_attachment(update) + assert Filters.premium_user(update) + def test_filters_chat_init(self): with pytest.raises(RuntimeError, match='in conjunction with'): Filters.chat(chat_id=1, username='chat') diff --git a/tests/test_helpers.py b/tests/test_helpers.py index bd18fbc7a06..4c435c5d875 100644 --- a/tests/test_helpers.py +++ b/tests/test_helpers.py @@ -272,7 +272,7 @@ def build_test_message(**kwargs): test_message.text = None test_message = build_test_message( - sticker=Sticker('sticker_id', 'unique_id', 50, 50, False, False) + sticker=Sticker('sticker_id', 'unique_id', 50, 50, False, False, Sticker.REGULAR) ) assert helpers.effective_message_type(test_message) == 'sticker' test_message.sticker = None diff --git a/tests/test_invoice.py b/tests/test_invoice.py index 6ed2f3c3011..711d40c4f50 100644 --- a/tests/test_invoice.py +++ b/tests/test_invoice.py @@ -100,8 +100,19 @@ def test_send_required_args_only(self, bot, chat_id, provider_token): assert message.invoice.title == self.title assert message.invoice.total_amount == self.total_amount + link = bot.create_invoice_link( + title=self.title, + description=self.description, + payload=self.payload, + provider_token=provider_token, + currency=self.currency, + prices=self.prices, + ) + assert isinstance(link, str) + assert link != "" + @flaky(3, 1) - def test_send_all_args(self, bot, chat_id, provider_token, monkeypatch): + def test_send_all_args_send_invoice(self, bot, chat_id, provider_token, monkeypatch): message = bot.send_invoice( chat_id, self.title, @@ -195,6 +206,56 @@ def make_assertion(*args, **_): protect_content=True, ) + def test_send_all_args_create_invoice_link(self, bot, chat_id, provider_token, monkeypatch): + def make_assertion(*args, **_): + kwargs = args[1] + return ( + kwargs["title"] == "title" + and kwargs["description"] == "description" + and kwargs["payload"] == "payload" + and kwargs["provider_token"] == "provider_token" + and kwargs["currency"] == "currency" + and kwargs["prices"] == [p.to_dict() for p in self.prices] + and kwargs["max_tip_amount"] == "max_tip_amount" + and kwargs["suggested_tip_amounts"] == "suggested_tip_amounts" + and kwargs["provider_data"] == "provider_data" + and kwargs["photo_url"] == "photo_url" + and kwargs["photo_size"] == "photo_size" + and kwargs["photo_width"] == "photo_width" + and kwargs["photo_height"] == "photo_height" + and kwargs["need_name"] == "need_name" + and kwargs["need_phone_number"] == "need_phone_number" + and kwargs["need_email"] == "need_email" + and kwargs["need_shipping_address"] == "need_shipping_address" + and kwargs["send_phone_number_to_provider"] == "send_phone_number_to_provider" + and kwargs["send_email_to_provider"] == "send_email_to_provider" + and kwargs["is_flexible"] == "is_flexible" + ) + + monkeypatch.setattr(bot, "_post", make_assertion) + assert bot.create_invoice_link( + title="title", + description="description", + payload="payload", + provider_token="provider_token", + currency="currency", + prices=self.prices, + max_tip_amount="max_tip_amount", + suggested_tip_amounts="suggested_tip_amounts", + provider_data="provider_data", + photo_url="photo_url", + photo_size="photo_size", + photo_width="photo_width", + photo_height="photo_height", + need_name="need_name", + need_phone_number="need_phone_number", + need_email="need_email", + need_shipping_address="need_shipping_address", + send_phone_number_to_provider="send_phone_number_to_provider", + send_email_to_provider="send_email_to_provider", + is_flexible="is_flexible", + ) + def test_send_object_as_provider_data(self, monkeypatch, bot, chat_id, provider_token): def test(url, data, **kwargs): # depends on whether we're using ujson diff --git a/tests/test_message.py b/tests/test_message.py index 4216a33bbcc..40ca7c79dd7 100644 --- a/tests/test_message.py +++ b/tests/test_message.py @@ -110,7 +110,7 @@ def message(bot): ) }, {'photo': [PhotoSize('photo_id', 'unique_id', 50, 50)], 'caption': 'photo_file'}, - {'sticker': Sticker('sticker_id', 'unique_id', 50, 50, True, False)}, + {'sticker': Sticker('sticker_id', 'unique_id', 50, 50, True, False, Sticker.REGULAR)}, {'video': Video('video_id', 'unique_id', 12, 12, 12), 'caption': 'video_file'}, {'voice': Voice('voice_id', 'unique_id', 5)}, {'video_note': VideoNote('video_note_id', 'unique_id', 20, 12)}, @@ -522,6 +522,36 @@ def test_text_markdown_emoji(self): ) assert expected == message.text_markdown + @pytest.mark.parametrize( + "type_", + argvalues=[ + "text_html", + "text_html_urled", + "text_markdown", + "text_markdown_urled", + "text_markdown_v2", + "text_markdown_v2_urled", + ], + ) + def test_text_custom_emoji(self, type_): + text = "Look a custom emoji: 😎" + expected = "Look a custom emoji: 😎" + emoji_entity = MessageEntity( + type=MessageEntity.CUSTOM_EMOJI, + offset=21, + length=2, + custom_emoji_id="5472409228461217725", + ) + message = Message( + 1, + from_user=self.from_user, + date=self.date, + chat=self.chat, + text=text, + entities=[emoji_entity], + ) + assert expected == message[type_] + def test_caption_html_simple(self): test_html_string = ( 'Test for <bold, ita_lic, ' @@ -631,6 +661,36 @@ def test_caption_markdown_emoji(self): ) assert expected == message.caption_markdown + @pytest.mark.parametrize( + "type_", + argvalues=[ + "caption_html", + "caption_html_urled", + "caption_markdown", + "caption_markdown_urled", + "caption_markdown_v2", + "caption_markdown_v2_urled", + ], + ) + def test_caption_custom_emoji(self, type_): + caption = "Look a custom emoji: 😎" + expected = "Look a custom emoji: 😎" + emoji_entity = MessageEntity( + type=MessageEntity.CUSTOM_EMOJI, + offset=21, + length=2, + custom_emoji_id="5472409228461217725", + ) + message = Message( + 1, + from_user=self.from_user, + date=self.date, + chat=self.chat, + caption=caption, + caption_entities=[emoji_entity], + ) + assert expected == message[type_] + def test_parse_entities_url_emoji(self): url = b'http://github.com/?unicode=\\u2713\\U0001f469'.decode('unicode-escape') text = 'some url' diff --git a/tests/test_official.py b/tests/test_official.py index b1798caae35..f17f6e7c88e 100644 --- a/tests/test_official.py +++ b/tests/test_official.py @@ -102,6 +102,8 @@ def check_method(h4): ignored |= {'current_offset'} # Added for ease of use elif name == 'promoteChatMember': ignored |= {'can_manage_voice_chats'} # for backwards compatibility + elif name == 'createNewStickerSet': + ignored |= {'contains_masks'} # for backwards compatibility assert (sig.parameters.keys() ^ checked) - ignored == set() @@ -195,7 +197,8 @@ def check_object(h4): 'voice_chat_scheduled', 'voice_chat_started', } - + elif name == 'StickerSet': + ignored |= {'contains_masks'} # for backwards compatibility assert (sig.parameters.keys() ^ checked) - ignored == set() diff --git a/tests/test_photo.py b/tests/test_photo.py index bc908ccf571..98985581d19 100644 --- a/tests/test_photo.py +++ b/tests/test_photo.py @@ -473,7 +473,15 @@ def test_equality(self, photo): b = PhotoSize('', photo.file_unique_id, self.width, self.height) c = PhotoSize(photo.file_id, photo.file_unique_id, 0, 0) d = PhotoSize('', '', self.width, self.height) - e = Sticker(photo.file_id, photo.file_unique_id, self.width, self.height, False, False) + e = Sticker( + photo.file_id, + photo.file_unique_id, + self.width, + self.height, + False, + False, + Sticker.REGULAR, + ) assert a == b assert hash(a) == hash(b) diff --git a/tests/test_sticker.py b/tests/test_sticker.py index d45cc83f843..8f7ecd77100 100644 --- a/tests/test_sticker.py +++ b/tests/test_sticker.py @@ -23,7 +23,7 @@ import pytest from flaky import flaky -from telegram import Sticker, PhotoSize, TelegramError, StickerSet, Audio, MaskPosition, Bot +from telegram import Sticker, PhotoSize, TelegramError, StickerSet, Audio, MaskPosition, Bot, File from telegram.error import BadRequest from tests.conftest import check_shortcut_call, check_shortcut_signature, check_defaults_handling @@ -83,10 +83,14 @@ class TestSticker: thumb_width = 319 thumb_height = 320 thumb_file_size = 21472 + type = Sticker.REGULAR + custom_emoji_id = "ThisIsSuchACustomEmojiID" sticker_file_id = '5a3128a4d2a04750b5b58397f3b5e812' sticker_file_unique_id = 'adc3145fd2e84d95b64d68eaa22aa33e' + premium_animation = File("this_is_an_id", "this_is_an_unique_id") + def test_slot_behaviour(self, sticker, mro_slots, recwarn): for attr in sticker.__slots__: assert getattr(sticker, attr, 'err') != 'err', f"got extra slot '{attr}'" @@ -117,6 +121,9 @@ def test_expected_values(self, sticker): assert sticker.thumb.width == self.thumb_width assert sticker.thumb.height == self.thumb_height assert sticker.thumb.file_size == self.thumb_file_size + assert sticker.type == self.type + # we need to be a premium TG user to send a premium sticker, so the below is not tested + # assert sticker.premium_animation == self.premium_animation @flaky(3, 1) def test_send_all_args(self, bot, chat_id, sticker_file, sticker): @@ -134,6 +141,8 @@ def test_send_all_args(self, bot, chat_id, sticker_file, sticker): assert message.sticker.is_animated == sticker.is_animated assert message.sticker.is_video == sticker.is_video assert message.sticker.file_size == sticker.file_size + # we need to be a premium TG user to send a premium sticker, so the below is not tested + # assert message.sticker.premium_animation == sticker.premium_animation assert isinstance(message.sticker.thumb, PhotoSize) assert isinstance(message.sticker.thumb.file_id, str) @@ -144,6 +153,7 @@ def test_send_all_args(self, bot, chat_id, sticker_file, sticker): assert message.sticker.thumb.height == sticker.thumb.height assert message.sticker.thumb.file_size == sticker.thumb.file_size assert message.has_protected_content + assert message.sticker.type == sticker.type @flaky(3, 1) def test_get_and_download(self, bot, sticker): @@ -186,6 +196,7 @@ def test_send_from_url(self, bot, chat_id): assert message.sticker.is_animated == sticker.is_animated assert message.sticker.is_video == sticker.is_video assert message.sticker.file_size == sticker.file_size + assert message.sticker.type == sticker.type assert isinstance(message.sticker.thumb, PhotoSize) assert isinstance(message.sticker.thumb.file_id, str) @@ -207,6 +218,9 @@ def test_de_json(self, bot, sticker): 'thumb': sticker.thumb.to_dict(), 'emoji': self.emoji, 'file_size': self.file_size, + 'premium_animation': self.premium_animation.to_dict(), + 'type': self.type, + 'custom_emoji_id': self.custom_emoji_id, } json_sticker = Sticker.de_json(json_dict, bot) @@ -219,6 +233,9 @@ def test_de_json(self, bot, sticker): assert json_sticker.emoji == self.emoji assert json_sticker.file_size == self.file_size assert json_sticker.thumb == sticker.thumb + assert json_sticker.premium_animation == self.premium_animation + assert json_sticker.type == self.type + assert json_sticker.custom_emoji_id == self.custom_emoji_id def test_send_with_sticker(self, monkeypatch, bot, chat_id, sticker): def test(url, data, **kwargs): @@ -289,6 +306,7 @@ def test_to_dict(self, sticker): assert sticker_dict['is_video'] == sticker.is_video assert sticker_dict['file_size'] == sticker.file_size assert sticker_dict['thumb'] == sticker.thumb.to_dict() + assert sticker_dict["type"] == sticker.type @flaky(3, 1) def test_error_send_empty_file(self, bot, chat_id): @@ -304,6 +322,34 @@ def test_error_without_required_args(self, bot, chat_id): with pytest.raises(TypeError): bot.send_sticker(chat_id) + @flaky(3, 1) + def test_premium_animation(self, bot): + # testing animation sucks a bit since we can't create a premium sticker. What we can do is + # get a sticker set which includes a premium sticker and check that specific one. + premium_sticker_set = bot.get_sticker_set("Flame") + # the first one to appear here is a sticker with unique file id of AQADOBwAAifPOElr + # this could change in the future ofc. + premium_sticker = premium_sticker_set.stickers[20] + assert premium_sticker.premium_animation.file_unique_id == "AQADOBwAAifPOElr" + assert isinstance(premium_sticker.premium_animation.file_id, str) + assert premium_sticker.premium_animation.file_id != "" + premium_sticker_dict = { + "file_unique_id": "AQADOBwAAifPOElr", + "file_id": premium_sticker.premium_animation.file_id, + "file_size": premium_sticker.premium_animation.file_size, + } + assert premium_sticker.premium_animation.to_dict() == premium_sticker_dict + + @flaky(3, 1) + def test_custom_emoji(self, bot): + # testing custom emoji stickers is as much of an annoyance as the premium animation, see + # in test_premium_animation + custom_emoji_set = bot.get_sticker_set("PTBStaticEmojiTestPack") + # the first one to appear here is a sticker with unique file id of AQADjBsAAkKD0Uty + # this could change in the future ofc. + custom_emoji_sticker = custom_emoji_set.stickers[0] + assert custom_emoji_sticker.custom_emoji_id == "6046140249875156202" + def test_equality(self, sticker): a = Sticker( sticker.file_id, @@ -312,12 +358,35 @@ def test_equality(self, sticker): self.height, self.is_animated, self.is_video, + self.type, ) b = Sticker( - '', sticker.file_unique_id, self.width, self.height, self.is_animated, self.is_video + "", + sticker.file_unique_id, + self.width, + self.height, + self.is_animated, + self.is_video, + self.type, + ) + c = Sticker( + sticker.file_id, + sticker.file_unique_id, + 0, + 0, + False, + True, + self.type, + ) + d = Sticker( + "", + "", + self.width, + self.height, + self.is_animated, + self.is_video, + self.type, ) - c = Sticker(sticker.file_id, sticker.file_unique_id, 0, 0, False, True) - d = Sticker('', '', self.width, self.height, self.is_animated, self.is_video) e = PhotoSize( sticker.file_id, sticker.file_unique_id, self.width, self.height, self.is_animated ) @@ -390,8 +459,9 @@ class TestStickerSet: is_animated = True is_video = True contains_masks = False - stickers = [Sticker('file_id', 'file_un_id', 512, 512, True, True)] + stickers = [Sticker('file_id', 'file_un_id', 512, 512, True, True, Sticker.REGULAR)] name = 'NOTAREALNAME' + sticker_type = Sticker.REGULAR def test_de_json(self, bot, sticker): name = f'test_by_{bot.username}' @@ -403,6 +473,7 @@ def test_de_json(self, bot, sticker): 'contains_masks': self.contains_masks, 'stickers': [x.to_dict() for x in self.stickers], 'thumb': sticker.thumb.to_dict(), + 'sticker_type': self.sticker_type, } sticker_set = StickerSet.de_json(json_dict, bot) @@ -413,6 +484,7 @@ def test_de_json(self, bot, sticker): assert sticker_set.contains_masks == self.contains_masks assert sticker_set.stickers == self.stickers assert sticker_set.thumb == sticker.thumb + assert sticker_set.sticker_type == self.sticker_type def test_create_sticker_set( self, bot, chat_id, sticker_file, animated_sticker_file, video_sticker_file @@ -500,6 +572,8 @@ def test_sticker_set_to_dict(self, sticker_set): assert sticker_set_dict['is_video'] == sticker_set.is_video assert sticker_set_dict['contains_masks'] == sticker_set.contains_masks assert sticker_set_dict['stickers'][0] == sticker_set.stickers[0].to_dict() + assert sticker_set_dict["thumb"] == sticker_set.thumb.to_dict() + assert sticker_set_dict["sticker_type"] == sticker_set.sticker_type @flaky(3, 1) def test_bot_methods_2_png(self, bot, sticker_set): @@ -600,6 +674,32 @@ def make_assertion(_, data, *args, **kwargs): assert test_flag monkeypatch.delattr(bot, '_post') + def test_create_new_sticker_all_params(self, monkeypatch, bot, chat_id, mask_position): + def make_assertion(_, data, *args, **kwargs): + assert data["user_id"] == chat_id + assert data["name"] == "name" + assert data["title"] == "title" + assert data["emojis"] == "emoji" + assert data["mask_position"] == mask_position.to_json() + assert data["png_sticker"] == "wow.png" + assert data["tgs_sticker"] == "wow.tgs" + assert data["webm_sticker"] == "wow.webm" + assert data["sticker_type"] == Sticker.MASK + + monkeypatch.setattr(bot, "_post", make_assertion) + bot.create_new_sticker_set( + chat_id, + "name", + "title", + "emoji", + mask_position=mask_position, + png_sticker="wow.png", + tgs_sticker="wow.tgs", + webm_sticker="wow.webm", + sticker_type=Sticker.MASK, + ) + monkeypatch.delattr(bot, "_post") + def test_add_sticker_to_set_local_files(self, monkeypatch, bot, chat_id): # For just test that the correct paths are passed as we have no local bot API set up test_flag = False @@ -649,6 +749,8 @@ def test_equality(self): self.contains_masks, self.stickers, self.is_video, + None, + self.sticker_type, ) b = StickerSet( self.name, @@ -658,9 +760,16 @@ def test_equality(self): self.stickers, self.is_video, ) - c = StickerSet(self.name, None, None, None, None, None) + c = StickerSet(self.name, None, None, None, None, None, None, Sticker.CUSTOM_EMOJI) d = StickerSet( - 'blah', self.title, self.is_animated, self.contains_masks, self.stickers, self.is_video + 'blah', + self.title, + self.is_animated, + self.contains_masks, + self.stickers, + self.is_video, + None, + self.sticker_type, ) e = Audio(self.name, '', 0, None, None) @@ -736,3 +845,23 @@ def test_equality(self): assert a != e assert hash(a) != hash(e) + + +class TestGetCustomEmojiSticker: + def test_custom_emoji_sticker(self, bot): + # we use the same ID as in test_custom_emoji + emoji_sticker_list = bot.get_custom_emoji_stickers(["6046140249875156202"]) + assert emoji_sticker_list[0].emoji == "😎" + assert emoji_sticker_list[0].height == 100 + assert emoji_sticker_list[0].width == 100 + assert not emoji_sticker_list[0].is_animated + assert not emoji_sticker_list[0].is_video + assert emoji_sticker_list[0].set_name == "PTBStaticEmojiTestPack" + assert emoji_sticker_list[0].type == Sticker.CUSTOM_EMOJI + assert emoji_sticker_list[0].custom_emoji_id == "6046140249875156202" + assert emoji_sticker_list[0].thumb.width == 100 + assert emoji_sticker_list[0].thumb.height == 100 + assert emoji_sticker_list[0].thumb.file_size == 3614 + assert emoji_sticker_list[0].thumb.file_unique_id == "AQAD6gwAAoY06FNy" + assert emoji_sticker_list[0].file_size == 3678 + assert emoji_sticker_list[0].file_unique_id == "AgAD6gwAAoY06FM" diff --git a/tests/test_user.py b/tests/test_user.py index 185d3fd8eb3..167871eed69 100644 --- a/tests/test_user.py +++ b/tests/test_user.py @@ -35,6 +35,8 @@ def json_dict(): 'can_join_groups': TestUser.can_join_groups, 'can_read_all_group_messages': TestUser.can_read_all_group_messages, 'supports_inline_queries': TestUser.supports_inline_queries, + 'is_premium': TestUser.is_premium, + 'added_to_attachment_menu': TestUser.added_to_attachment_menu, } @@ -51,6 +53,8 @@ def user(bot): can_read_all_group_messages=TestUser.can_read_all_group_messages, supports_inline_queries=TestUser.supports_inline_queries, bot=bot, + is_premium=TestUser.is_premium, + added_to_attachment_menu=TestUser.added_to_attachment_menu, ) @@ -64,6 +68,8 @@ class TestUser: can_join_groups = True can_read_all_group_messages = True supports_inline_queries = False + is_premium = True + added_to_attachment_menu = False def test_slot_behaviour(self, user, mro_slots, recwarn): for attr in user.__slots__: @@ -85,6 +91,8 @@ def test_de_json(self, json_dict, bot): assert user.can_join_groups == self.can_join_groups assert user.can_read_all_group_messages == self.can_read_all_group_messages assert user.supports_inline_queries == self.supports_inline_queries + assert user.is_premium == self.is_premium + assert user.added_to_attachment_menu == self.added_to_attachment_menu def test_de_json_without_username(self, json_dict, bot): del json_dict['username'] @@ -100,6 +108,8 @@ def test_de_json_without_username(self, json_dict, bot): assert user.can_join_groups == self.can_join_groups assert user.can_read_all_group_messages == self.can_read_all_group_messages assert user.supports_inline_queries == self.supports_inline_queries + assert user.is_premium == self.is_premium + assert user.added_to_attachment_menu == self.added_to_attachment_menu def test_de_json_without_username_and_last_name(self, json_dict, bot): del json_dict['username'] @@ -116,6 +126,8 @@ def test_de_json_without_username_and_last_name(self, json_dict, bot): assert user.can_join_groups == self.can_join_groups assert user.can_read_all_group_messages == self.can_read_all_group_messages assert user.supports_inline_queries == self.supports_inline_queries + assert user.is_premium == self.is_premium + assert user.added_to_attachment_menu == self.added_to_attachment_menu def test_name(self, user): assert user.name == '@username'