Skip to content

Commit

Permalink
API 7.0 (#4034, #4038)
Browse files Browse the repository at this point in the history
Co-authored-by: poolitzer <github@poolitzer.eu>
Co-authored-by: Hinrich Mahler <22366557+Bibo-Joshi@users.noreply.github.com>
Co-authored-by: Harshil <37377066+harshil21@users.noreply.github.com>
Co-authored-by: aelkheir <arelkheir@gmail.com>
Co-authored-by: aelkheir <90580077+aelkheir@users.noreply.github.com>
  • Loading branch information
6 people committed Feb 8, 2024
1 parent 29866e2 commit 03d2359
Show file tree
Hide file tree
Showing 120 changed files with 13,883 additions and 1,392 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/unit_tests.yml
Expand Up @@ -3,9 +3,11 @@ on:
pull_request:
branches:
- master

push:
branches:
- master

schedule:
# Run monday and friday morning at 03:07 - odd time to spread load on GitHub Actions
- cron: '7 3 * * 1,5'
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Expand Up @@ -14,7 +14,7 @@
:target: https://pypi.org/project/python-telegram-bot/
:alt: Supported Python versions

.. image:: https://img.shields.io/badge/Bot%20API-6.9-blue?logo=telegram
.. image:: https://img.shields.io/badge/Bot%20API-7.0-blue?logo=telegram
:target: https://core.telegram.org/bots/api-changelog
:alt: Supported Bot API versions

Expand Down Expand Up @@ -93,7 +93,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.9** are supported.
All types and methods of the Telegram Bot API **7.0** are supported.

Installing
==========
Expand Down
4 changes: 2 additions & 2 deletions README_RAW.rst
Expand Up @@ -14,7 +14,7 @@
:target: https://pypi.org/project/python-telegram-bot-raw/
:alt: Supported Python versions

.. image:: https://img.shields.io/badge/Bot%20API-6.9-blue?logo=telegram
.. image:: https://img.shields.io/badge/Bot%20API-7.0-blue?logo=telegram
:target: https://core.telegram.org/bots/api-changelog
:alt: Supported Bot API versions

Expand Down Expand Up @@ -89,7 +89,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.9** are supported.
All types and methods of the Telegram Bot API **7.0** are supported.

Installing
==========
Expand Down
7 changes: 7 additions & 0 deletions docs/auxil/tg_const_role.py
Expand Up @@ -15,6 +15,7 @@
#
# You should have received a copy of the GNU Lesser Public License
# along with this program. If not, see [http://www.gnu.org/licenses/].
import datetime
from enum import Enum

from docutils.nodes import Element
Expand Down Expand Up @@ -71,6 +72,12 @@ def process_link(
if isinstance(value, tuple) and target in (
"telegram.constants.BOT_API_VERSION_INFO",
"telegram.__version_info__",
):
return str(value), target
if (
isinstance(value, datetime.datetime)
and value == telegram.constants.ZERO_DATE
and target in ("telegram.constants.ZERO_DATE",)
):
return repr(value), target
sphinx_logger.warning(
Expand Down
14 changes: 12 additions & 2 deletions docs/source/inclusions/bot_methods.rst
Expand Up @@ -49,8 +49,12 @@
- Used for sending voice messages
* - :meth:`~telegram.Bot.copy_message`
- Used for copying the contents of an arbitrary message
* - :meth:`~telegram.Bot.copy_messages`
- Used for copying the contents of an multiple arbitrary messages
* - :meth:`~telegram.Bot.forward_message`
- Used for forwarding messages
* - :meth:`~telegram.Bot.forward_messages`
- Used for forwarding multiple messages at once

.. raw:: html

Expand All @@ -76,6 +80,10 @@
- Used for answering a shipping query
* - :meth:`~telegram.Bot.answer_web_app_query`
- Used for answering a web app query
* - :meth:`~telegram.Bot.delete_message`
- Used for deleting messages.
* - :meth:`~telegram.Bot.delete_messages`
- Used for deleting multiple messages as once.
* - :meth:`~telegram.Bot.edit_message_caption`
- Used for editing captions
* - :meth:`~telegram.Bot.edit_message_media`
Expand All @@ -88,8 +96,8 @@
- Used for editing text messages
* - :meth:`~telegram.Bot.stop_poll`
- Used for stopping the running poll
* - :meth:`~telegram.Bot.delete_message`
- Used for deleting messages.
* - :meth:`~telegram.Bot.set_message_reaction`
- Used for setting reactions on messages

.. raw:: html

Expand Down Expand Up @@ -157,6 +165,8 @@
- Used for getting the number of members in a chat
* - :meth:`~telegram.Bot.get_chat_member`
- Used for getting a member of a chat
* - :meth:`~telegram.Bot.get_user_chat_boosts`
- Used for getting the list of boosts added to a chat
* - :meth:`~telegram.Bot.leave_chat`
- Used for leaving a chat

Expand Down
31 changes: 31 additions & 0 deletions docs/source/telegram.at-tree.rst
Expand Up @@ -21,6 +21,13 @@ Available Types
telegram.callbackquery
telegram.chat
telegram.chatadministratorrights
telegram.chatboost
telegram.chatboostremoved
telegram.chatboostsource
telegram.chatboostsourcegiftcode
telegram.chatboostsourcegiveaway
telegram.chatboostsourcepremium
telegram.chatboostupdated
telegram.chatinvitelink
telegram.chatjoinrequest
telegram.chatlocation
Expand All @@ -38,6 +45,7 @@ Available Types
telegram.contact
telegram.dice
telegram.document
telegram.externalreplyinfo
telegram.file
telegram.forcereply
telegram.forumtopic
Expand All @@ -47,6 +55,11 @@ Available Types
telegram.forumtopicreopened
telegram.generalforumtopichidden
telegram.generalforumtopicunhidden
telegram.giveaway
telegram.giveawaycompleted
telegram.giveawaycreated
telegram.giveawaywinners
telegram.inaccessiblemessage
telegram.inlinekeyboardbutton
telegram.inlinekeyboardmarkup
telegram.inputfile
Expand All @@ -61,8 +74,11 @@ Available Types
telegram.keyboardbuttonpolltype
telegram.keyboardbuttonrequestchat
telegram.keyboardbuttonrequestuser
telegram.keyboardbuttonrequestusers
telegram.linkpreviewoptions
telegram.location
telegram.loginurl
telegram.maybeinaccessiblemessage
telegram.menubutton
telegram.menubuttoncommands
telegram.menubuttondefault
Expand All @@ -71,21 +87,36 @@ Available Types
telegram.messageautodeletetimerchanged
telegram.messageentity
telegram.messageid
telegram.messageorigin
telegram.messageoriginchannel
telegram.messageoriginchat
telegram.messageoriginhiddenuser
telegram.messageoriginuser
telegram.messagereactioncountupdated
telegram.messagereactionupdated
telegram.photosize
telegram.poll
telegram.pollanswer
telegram.polloption
telegram.proximityalerttriggered
telegram.reactioncount
telegram.reactiontype
telegram.reactiontypecustomemoji
telegram.reactiontypeemoji
telegram.replykeyboardmarkup
telegram.replykeyboardremove
telegram.replyparameters
telegram.sentwebappmessage
telegram.story
telegram.switchinlinequerychosenchat
telegram.telegramobject
telegram.textquote
telegram.update
telegram.user
telegram.userchatboosts
telegram.userprofilephotos
telegram.usershared
telegram.usersshared
telegram.venue
telegram.video
telegram.videochatended
Expand Down
8 changes: 8 additions & 0 deletions docs/source/telegram.chatboost.rst
@@ -0,0 +1,8 @@
ChatBoost
=========

.. versionadded:: NEXT.VERSION

.. autoclass:: telegram.ChatBoost
:members:
:show-inheritance:
8 changes: 8 additions & 0 deletions docs/source/telegram.chatboostremoved.rst
@@ -0,0 +1,8 @@
ChatBoostRemoved
================

.. versionadded:: NEXT.VERSION

.. autoclass:: telegram.ChatBoostRemoved
:members:
:show-inheritance:
8 changes: 8 additions & 0 deletions docs/source/telegram.chatboostsource.rst
@@ -0,0 +1,8 @@
ChatBoostSource
===============

.. versionadded:: NEXT.VERSION

.. autoclass:: telegram.ChatBoostSource
:members:
:show-inheritance:
8 changes: 8 additions & 0 deletions docs/source/telegram.chatboostsourcegiftcode.rst
@@ -0,0 +1,8 @@
ChatBoostSourceGiftCode
=======================

.. versionadded:: NEXT.VERSION

.. autoclass:: telegram.ChatBoostSourceGiftCode
:members:
:show-inheritance:
8 changes: 8 additions & 0 deletions docs/source/telegram.chatboostsourcegiveaway.rst
@@ -0,0 +1,8 @@
ChatBoostSourceGiveaway
=======================

.. versionadded:: NEXT.VERSION

.. autoclass:: telegram.ChatBoostSourceGiveaway
:members:
:show-inheritance:
8 changes: 8 additions & 0 deletions docs/source/telegram.chatboostsourcepremium.rst
@@ -0,0 +1,8 @@
ChatBoostSourcePremium
======================

.. versionadded:: NEXT.VERSION

.. autoclass:: telegram.ChatBoostSourcePremium
:members:
:show-inheritance:
8 changes: 8 additions & 0 deletions docs/source/telegram.chatboostupdated.rst
@@ -0,0 +1,8 @@
ChatBoostUpdated
================

.. versionadded:: NEXT.VERSION

.. autoclass:: telegram.ChatBoostUpdated
:members:
:show-inheritance:
8 changes: 8 additions & 0 deletions docs/source/telegram.ext.chatboosthandler.rst
@@ -0,0 +1,8 @@
ChatBoostHandler
================

.. versionadded:: NEXT.VERSION

.. autoclass:: telegram.ext.ChatBoostHandler
:members:
:show-inheritance:
2 changes: 2 additions & 0 deletions docs/source/telegram.ext.handlers-tree.rst
Expand Up @@ -6,6 +6,7 @@ Handlers

telegram.ext.basehandler
telegram.ext.callbackqueryhandler
telegram.ext.chatboosthandler
telegram.ext.chatjoinrequesthandler
telegram.ext.chatmemberhandler
telegram.ext.choseninlineresulthandler
Expand All @@ -14,6 +15,7 @@ Handlers
telegram.ext.filters
telegram.ext.inlinequeryhandler
telegram.ext.messagehandler
telegram.ext.messagereactionhandler
telegram.ext.pollanswerhandler
telegram.ext.pollhandler
telegram.ext.precheckoutqueryhandler
Expand Down
6 changes: 6 additions & 0 deletions docs/source/telegram.ext.messagereactionhandler.rst
@@ -0,0 +1,6 @@
MessageReactionHandler
======================

.. autoclass:: telegram.ext.MessageReactionHandler
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletions docs/source/telegram.externalreplyinfo.rst
@@ -0,0 +1,6 @@
ExternalReplyInfo
=================

.. autoclass:: telegram.ExternalReplyInfo
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletions docs/source/telegram.giveaway.rst
@@ -0,0 +1,6 @@
Giveaway
========

.. autoclass:: telegram.Giveaway
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletions docs/source/telegram.giveawaycompleted.rst
@@ -0,0 +1,6 @@
GiveawayCompleted
=================

.. autoclass:: telegram.GiveawayCompleted
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletions docs/source/telegram.giveawaycreated.rst
@@ -0,0 +1,6 @@
GiveawayCreated
===============

.. autoclass:: telegram.GiveawayCreated
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletions docs/source/telegram.giveawaywinners.rst
@@ -0,0 +1,6 @@
GiveawayWinners
===============

.. autoclass:: telegram.GiveawayWinners
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletions docs/source/telegram.inaccessiblemessage.rst
@@ -0,0 +1,6 @@
InaccessibleMessage
===================

.. autoclass:: telegram.InaccessibleMessage
:members:
:show-inheritance:
2 changes: 1 addition & 1 deletion docs/source/telegram.keyboardbuttonrequestuser.rst
@@ -1,5 +1,5 @@
KeyboardButtonRequestUser
==================================
=========================

.. autoclass:: telegram.KeyboardButtonRequestUser
:members:
Expand Down
6 changes: 6 additions & 0 deletions docs/source/telegram.keyboardbuttonrequestusers.rst
@@ -0,0 +1,6 @@
KeyboardButtonRequestUsers
==========================

.. autoclass:: telegram.KeyboardButtonRequestUsers
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletions docs/source/telegram.linkpreviewoptions.rst
@@ -0,0 +1,6 @@
LinkPreviewOptions
==================

.. autoclass:: telegram.LinkPreviewOptions
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletions docs/source/telegram.maybeinaccessiblemessage.rst
@@ -0,0 +1,6 @@
MaybeInaccessibleMessage
========================

.. autoclass:: telegram.MaybeInaccessibleMessage
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletions docs/source/telegram.messageorigin.rst
@@ -0,0 +1,6 @@
MessageOrigin
=============

.. autoclass:: telegram.MessageOrigin
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletions docs/source/telegram.messageoriginchannel.rst
@@ -0,0 +1,6 @@
MessageOriginChannel
====================

.. autoclass:: telegram.MessageOriginChannel
:members:
:show-inheritance:
6 changes: 6 additions & 0 deletions docs/source/telegram.messageoriginchat.rst
@@ -0,0 +1,6 @@
MessageOriginChat
=================

.. autoclass:: telegram.MessageOriginChat
:members:
:show-inheritance:

0 comments on commit 03d2359

Please sign in to comment.