mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-14 10:53:23 +00:00
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:
parent
756cfeba0a
commit
6795b3de05
244 changed files with 9401 additions and 1715 deletions
81
.butcher/types/Giveaway/entity.json
Normal file
81
.butcher/types/Giveaway/entity.json
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
{
|
||||
"meta": {},
|
||||
"group": {
|
||||
"title": "Available types",
|
||||
"anchor": "available-types"
|
||||
},
|
||||
"object": {
|
||||
"anchor": "giveaway",
|
||||
"name": "Giveaway",
|
||||
"description": "This object represents a message about a scheduled giveaway.",
|
||||
"html_description": "<p>This object represents a message about a scheduled giveaway.</p>",
|
||||
"rst_description": "This object represents a message about a scheduled giveaway.",
|
||||
"annotations": [
|
||||
{
|
||||
"type": "Array of Chat",
|
||||
"description": "The list of chats which the user must join to participate in the giveaway",
|
||||
"html_description": "<td>The list of chats which the user must join to participate in the giveaway</td>",
|
||||
"rst_description": "The list of chats which the user must join to participate in the giveaway\n",
|
||||
"name": "chats",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Point in time (Unix timestamp) when winners of the giveaway will be selected",
|
||||
"html_description": "<td>Point in time (Unix timestamp) when winners of the giveaway will be selected</td>",
|
||||
"rst_description": "Point in time (Unix timestamp) when winners of the giveaway will be selected\n",
|
||||
"name": "winners_selection_date",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "The number of users which are supposed to be selected as winners of the giveaway",
|
||||
"html_description": "<td>The number of users which are supposed to be selected as winners of the giveaway</td>",
|
||||
"rst_description": "The number of users which are supposed to be selected as winners of the giveaway\n",
|
||||
"name": "winner_count",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "True",
|
||||
"description": "True, if only users who join the chats after the giveaway started should be eligible to win",
|
||||
"html_description": "<td><em>Optional</em>. <em>True</em>, if only users who join the chats after the giveaway started should be eligible to win</td>",
|
||||
"rst_description": "*Optional*. :code:`True`, if only users who join the chats after the giveaway started should be eligible to win\n",
|
||||
"name": "only_new_members",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "True",
|
||||
"description": "True, if the list of giveaway winners will be visible to everyone",
|
||||
"html_description": "<td><em>Optional</em>. <em>True</em>, if the list of giveaway winners will be visible to everyone</td>",
|
||||
"rst_description": "*Optional*. :code:`True`, if the list of giveaway winners will be visible to everyone\n",
|
||||
"name": "has_public_winners",
|
||||
"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
|
||||
},
|
||||
{
|
||||
"type": "Array of String",
|
||||
"description": "A list of two-letter ISO 3166-1 alpha-2 country codes indicating the countries from which eligible users for the giveaway must come. If empty, then all users can participate in the giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways.",
|
||||
"html_description": "<td><em>Optional</em>. A list of two-letter <a href=\"https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2\">ISO 3166-1 alpha-2</a> country codes indicating the countries from which eligible users for the giveaway must come. If empty, then all users can participate in the giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways.</td>",
|
||||
"rst_description": "*Optional*. A list of two-letter `ISO 3166-1 alpha-2 <https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2>`_ country codes indicating the countries from which eligible users for the giveaway must come. If empty, then all users can participate in the giveaway. Users with a phone number that was bought on Fragment can always participate in giveaways.\n",
|
||||
"name": "country_codes",
|
||||
"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
|
||||
}
|
||||
],
|
||||
"category": "types"
|
||||
}
|
||||
}
|
||||
5
.butcher/types/Giveaway/replace.yml
Normal file
5
.butcher/types/Giveaway/replace.yml
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
annotations:
|
||||
winners_selection_date:
|
||||
parsed_type:
|
||||
type: std
|
||||
name: DateTime
|
||||
Loading…
Add table
Add a link
Reference in a new issue