Added support for Telegram Bot API 9.5 (#1780)

* Update API methods and types for Telegram Bot API 9.5

* Draft: follow-up for Bot API 9.5 (#1780) (#1781)

* Add set_chat_member_tag shortcut coverage

* Add set_member_tag shortcut tests and align decoration expectations

* Fix follow-up test coverage for sender_tag and can_edit_tag

* Add changelog fragment for PR 1781

* Align changelog with base PR #1780

* Expand 1780 changelog to cover base and follow-up scope

* Treat sender_tag as metadata, not message content type

---------

Co-authored-by: Latand <latand@users.noreply.github.com>
Co-authored-by: Codex Agent <codex@openclaw.local>

* Add tests for date_time formatting with Unix time and datetime objects

* Update changelog with Telegram Bot API 9.5 changes

---------

Co-authored-by: Kostiantyn Kriuchkov <36363097+Latand@users.noreply.github.com>
Co-authored-by: Latand <latand@users.noreply.github.com>
Co-authored-by: Codex Agent <codex@openclaw.local>
This commit is contained in:
Alex Root Junior 2026-03-03 01:19:11 +02:00 committed by GitHub
parent 73710acb4c
commit f68c24d620
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
52 changed files with 872 additions and 79 deletions

View file

@ -47,8 +47,8 @@
"type": "InlineKeyboardMarkup",
"required": false,
"description": "A JSON-serialized object for the new inline keyboard for the message",
"html_description": "<td>A JSON-serialized object for the new inline keyboard for the message</td>",
"rst_description": "A JSON-serialized object for the new inline keyboard for the message\n",
"html_description": "<td>A JSON-serialized object for the new <a href=\"/bots/features#inline-keyboards\">inline keyboard</a> for the message</td>",
"rst_description": "A JSON-serialized object for the new `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_ for the message\n",
"name": "reply_markup"
}
],

View file

@ -154,6 +154,14 @@
"html_description": "<td>Pass <em>True</em> if the administrator can manage direct messages within the channel and decline suggested posts; for channels only</td>",
"rst_description": "Pass :code:`True` if the administrator can manage direct messages within the channel and decline suggested posts; for channels only\n",
"name": "can_manage_direct_messages"
},
{
"type": "Boolean",
"required": false,
"description": "Pass True if the administrator can edit the tags of regular members; for groups and supergroups only",
"html_description": "<td>Pass <em>True</em> if the administrator can edit the tags of regular members; for groups and supergroups only</td>",
"rst_description": "Pass :code:`True` if the administrator can edit the tags of regular members; for groups and supergroups only\n",
"name": "can_manage_tags"
}
],
"category": "methods"

View file

@ -71,8 +71,8 @@
"type": "InlineKeyboardMarkup",
"required": false,
"description": "A JSON-serialized object for an inline keyboard",
"html_description": "<td>A JSON-serialized object for an inline keyboard</td>",
"rst_description": "A JSON-serialized object for an inline keyboard\n",
"html_description": "<td>A JSON-serialized object for an <a href=\"/bots/features#inline-keyboards\">inline keyboard</a></td>",
"rst_description": "A JSON-serialized object for an `inline keyboard <https://core.telegram.org/bots/features#inline-keyboards>`_\n",
"name": "reply_markup"
}
],

View file

@ -7,9 +7,9 @@
"object": {
"anchor": "sendmessagedraft",
"name": "sendMessageDraft",
"description": "Use this method to stream a partial message to a user while the message is being generated; supported only for bots with forum topic mode enabled. Returns True on success.",
"html_description": "<p>Use this method to stream a partial message to a user while the message is being generated; supported only for bots with forum topic mode enabled. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to stream a partial message to a user while the message is being generated; supported only for bots with forum topic mode enabled. Returns :code:`True` on success.",
"description": "Use this method to stream a partial message to a user while the message is being generated. Returns True on success.",
"html_description": "<p>Use this method to stream a partial message to a user while the message is being generated. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to stream a partial message to a user while the message is being generated. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer",

View file

@ -0,0 +1,41 @@
{
"meta": {},
"group": {
"title": "Available methods",
"anchor": "available-methods"
},
"object": {
"anchor": "setchatmembertag",
"name": "setChatMemberTag",
"description": "Use this method to set a tag for a regular member in a group or a supergroup. The bot must be an administrator in the chat for this to work and must have the can_manage_tags administrator right. Returns True on success.",
"html_description": "<p>Use this method to set a tag for a regular member in a group or a supergroup. The bot must be an administrator in the chat for this to work and must have the <em>can_manage_tags</em> administrator right. Returns <em>True</em> on success.</p>",
"rst_description": "Use this method to set a tag for a regular member in a group or a supergroup. The bot must be an administrator in the chat for this to work and must have the *can_manage_tags* administrator right. Returns :code:`True` on success.",
"annotations": [
{
"type": "Integer or String",
"required": true,
"description": "Unique identifier for the target chat or username of the target supergroup (in the format @supergroupusername)",
"html_description": "<td>Unique identifier for the target chat or username of the target supergroup (in the format <code>@supergroupusername</code>)</td>",
"rst_description": "Unique identifier for the target chat or username of the target supergroup (in the format :code:`@supergroupusername`)\n",
"name": "chat_id"
},
{
"type": "Integer",
"required": true,
"description": "Unique identifier of the target user",
"html_description": "<td>Unique identifier of the target user</td>",
"rst_description": "Unique identifier of the target user\n",
"name": "user_id"
},
{
"type": "String",
"required": false,
"description": "New tag for the member; 0-16 characters, emoji are not allowed",
"html_description": "<td>New tag for the member; 0-16 characters, emoji are not allowed</td>",
"rst_description": "New tag for the member; 0-16 characters, emoji are not allowed\n",
"name": "tag"
}
],
"category": "methods"
}
}