Added support for Bot API 7.0 (#1387)

* Added support for Bot API 7.0

* Fixed available tests

* Fixed text decorations

* Bot API 7.0 tests for ForwardMessages

* Bot API 7.0 tests for CopyMessages

* Bot API 7.0 tests for DeleteMessages

* Bot API 7.0 tests for GetUserChatBoosts

* Bot API 7.0 tests for SetMessageReaction

* Fixed custom_emoji attribute name

* Fixed tests

* Test parsing CallbackQuery message (inaccessible and accessible)

* Added changes description

* Bot API 7.0 tests for dispatcher handle update message_reaction

* Bot API 7.0 tests for dispatcher handle update message_reaction_count

* Bot API 7.0 tests for dispatcher handle update chat_boost

* Bot API 7.0 tests for dispatcher handle update removed_chat_boost

* fix tests: update ReactionTypeCustomEmoji custom_emoji -> custom_emoji_id

* micro fix Markdown V2 blockquote

* add tests for Markdown tools

* fix markdown test apply single entity

* add tests coverage for Message.react

* check that all messages and content types are covered for Message.content_type

* sort imports in tests (run `make reformat lint`)

* update Giveaway objects Unix time field to DateTime type

* Update Message.content_type property

* upgrade tests for message content_types and sent_copy

* Update Giveaway type generation config

* Update GiveawayWinners and PassportFile types generation configs

---------

Co-authored-by: Suren Khorenyan <surenkhorenyan@gmail.com>
This commit is contained in:
Alex Root Junior 2023-12-31 01:40:44 +02:00 committed by GitHub
parent 756cfeba0a
commit 6795b3de05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
244 changed files with 9401 additions and 1715 deletions

View file

@ -0,0 +1,105 @@
{
"meta": {},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "giveawaywinners",
"name": "GiveawayWinners",
"description": "This object represents a message about the completion of a giveaway with public winners.",
"html_description": "<p>This object represents a message about the completion of a giveaway with public winners.</p>",
"rst_description": "This object represents a message about the completion of a giveaway with public winners.",
"annotations": [
{
"type": "Chat",
"description": "The chat that created the giveaway",
"html_description": "<td>The chat that created the giveaway</td>",
"rst_description": "The chat that created the giveaway\n",
"name": "chat",
"required": true
},
{
"type": "Integer",
"description": "Identifier of the messsage with the giveaway in the chat",
"html_description": "<td>Identifier of the messsage with the giveaway in the chat</td>",
"rst_description": "Identifier of the messsage with the giveaway in the chat\n",
"name": "giveaway_message_id",
"required": true
},
{
"type": "Integer",
"description": "Point in time (Unix timestamp) when winners of the giveaway were selected",
"html_description": "<td>Point in time (Unix timestamp) when winners of the giveaway were selected</td>",
"rst_description": "Point in time (Unix timestamp) when winners of the giveaway were selected\n",
"name": "winners_selection_date",
"required": true
},
{
"type": "Integer",
"description": "Total number of winners in the giveaway",
"html_description": "<td>Total number of winners in the giveaway</td>",
"rst_description": "Total number of winners in the giveaway\n",
"name": "winner_count",
"required": true
},
{
"type": "Array of User",
"description": "List of up to 100 winners of the giveaway",
"html_description": "<td>List of up to 100 winners of the giveaway</td>",
"rst_description": "List of up to 100 winners of the giveaway\n",
"name": "winners",
"required": true
},
{
"type": "Integer",
"description": "The number of other chats the user had to join in order to be eligible for the giveaway",
"html_description": "<td><em>Optional</em>. The number of other chats the user had to join in order to be eligible for the giveaway</td>",
"rst_description": "*Optional*. The number of other chats the user had to join in order to be eligible for the giveaway\n",
"name": "additional_chat_count",
"required": false
},
{
"type": "Integer",
"description": "The number of months the Telegram Premium subscription won from the giveaway will be active for",
"html_description": "<td><em>Optional</em>. The number of months the Telegram Premium subscription won from the giveaway will be active for</td>",
"rst_description": "*Optional*. The number of months the Telegram Premium subscription won from the giveaway will be active for\n",
"name": "premium_subscription_month_count",
"required": false
},
{
"type": "Integer",
"description": "Number of undistributed prizes",
"html_description": "<td><em>Optional</em>. Number of undistributed prizes</td>",
"rst_description": "*Optional*. Number of undistributed prizes\n",
"name": "unclaimed_prize_count",
"required": false
},
{
"type": "True",
"description": "True, if only users who had joined the chats after the giveaway started were eligible to win",
"html_description": "<td><em>Optional</em>. <em>True</em>, if only users who had joined the chats after the giveaway started were eligible to win</td>",
"rst_description": "*Optional*. :code:`True`, if only users who had joined the chats after the giveaway started were eligible to win\n",
"name": "only_new_members",
"required": false
},
{
"type": "True",
"description": "True, if the giveaway was canceled because the payment for it was refunded",
"html_description": "<td><em>Optional</em>. <em>True</em>, if the giveaway was canceled because the payment for it was refunded</td>",
"rst_description": "*Optional*. :code:`True`, if the giveaway was canceled because the payment for it was refunded\n",
"name": "was_refunded",
"required": false
},
{
"type": "String",
"description": "Description of additional giveaway prize",
"html_description": "<td><em>Optional</em>. Description of additional giveaway prize</td>",
"rst_description": "*Optional*. Description of additional giveaway prize\n",
"name": "prize_description",
"required": false
}
],
"category": "types"
}
}

View file

@ -0,0 +1,5 @@
annotations:
winners_selection_date:
parsed_type:
type: std
name: DateTime