mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +00:00
Added full support for Bot API 8.0 (#1606)
* Added full support of Bot API 8.0 * Added tests * Reformat code * Added changelog * Bump API version
This commit is contained in:
parent
f2916ca03f
commit
dfc88fc907
169 changed files with 1890 additions and 162 deletions
57
.butcher/types/Gift/entity.json
Normal file
57
.butcher/types/Gift/entity.json
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
"meta": {},
|
||||
"group": {
|
||||
"title": "Stickers",
|
||||
"anchor": "stickers"
|
||||
},
|
||||
"object": {
|
||||
"anchor": "gift",
|
||||
"name": "Gift",
|
||||
"description": "This object represents a gift that can be sent by the bot.",
|
||||
"html_description": "<p>This object represents a gift that can be sent by the bot.</p>",
|
||||
"rst_description": "This object represents a gift that can be sent by the bot.",
|
||||
"annotations": [
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Unique identifier of the gift",
|
||||
"html_description": "<td>Unique identifier of the gift</td>",
|
||||
"rst_description": "Unique identifier of the gift\n",
|
||||
"name": "id",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "Sticker",
|
||||
"description": "The sticker that represents the gift",
|
||||
"html_description": "<td>The sticker that represents the gift</td>",
|
||||
"rst_description": "The sticker that represents the gift\n",
|
||||
"name": "sticker",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "The number of Telegram Stars that must be paid to send the sticker",
|
||||
"html_description": "<td>The number of Telegram Stars that must be paid to send the sticker</td>",
|
||||
"rst_description": "The number of Telegram Stars that must be paid to send the sticker\n",
|
||||
"name": "star_count",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "The total number of the gifts of this type that can be sent; for limited gifts only",
|
||||
"html_description": "<td><em>Optional</em>. The total number of the gifts of this type that can be sent; for limited gifts only</td>",
|
||||
"rst_description": "*Optional*. The total number of the gifts of this type that can be sent; for limited gifts only\n",
|
||||
"name": "total_count",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "The number of remaining gifts of this type that can be sent; for limited gifts only",
|
||||
"html_description": "<td><em>Optional</em>. The number of remaining gifts of this type that can be sent; for limited gifts only</td>",
|
||||
"rst_description": "*Optional*. The number of remaining gifts of this type that can be sent; for limited gifts only\n",
|
||||
"name": "remaining_count",
|
||||
"required": false
|
||||
}
|
||||
],
|
||||
"category": "types"
|
||||
}
|
||||
}
|
||||
25
.butcher/types/Gifts/entity.json
Normal file
25
.butcher/types/Gifts/entity.json
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"meta": {},
|
||||
"group": {
|
||||
"title": "Stickers",
|
||||
"anchor": "stickers"
|
||||
},
|
||||
"object": {
|
||||
"anchor": "gifts",
|
||||
"name": "Gifts",
|
||||
"description": "This object represent a list of gifts.",
|
||||
"html_description": "<p>This object represent a list of gifts.</p>",
|
||||
"rst_description": "This object represent a list of gifts.",
|
||||
"annotations": [
|
||||
{
|
||||
"type": "Array of Gift",
|
||||
"description": "The list of gifts",
|
||||
"html_description": "<td>The list of gifts</td>",
|
||||
"rst_description": "The list of gifts\n",
|
||||
"name": "gifts",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"category": "types"
|
||||
}
|
||||
}
|
||||
33
.butcher/types/PreparedInlineMessage/entity.json
Normal file
33
.butcher/types/PreparedInlineMessage/entity.json
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"meta": {},
|
||||
"group": {
|
||||
"title": "Inline mode",
|
||||
"anchor": "inline-mode"
|
||||
},
|
||||
"object": {
|
||||
"anchor": "preparedinlinemessage",
|
||||
"name": "PreparedInlineMessage",
|
||||
"description": "Describes an inline message to be sent by a user of a Mini App.",
|
||||
"html_description": "<p>Describes an inline message to be sent by a user of a Mini App.</p>",
|
||||
"rst_description": "Describes an inline message to be sent by a user of a Mini App.",
|
||||
"annotations": [
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Unique identifier of the prepared message",
|
||||
"html_description": "<td>Unique identifier of the prepared message</td>",
|
||||
"rst_description": "Unique identifier of the prepared message\n",
|
||||
"name": "id",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Expiration date of the prepared message, in Unix time. Expired prepared messages can no longer be used",
|
||||
"html_description": "<td>Expiration date of the prepared message, in Unix time. Expired prepared messages can no longer be used</td>",
|
||||
"rst_description": "Expiration date of the prepared message, in Unix time. Expired prepared messages can no longer be used\n",
|
||||
"name": "expiration_date",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"category": "types"
|
||||
}
|
||||
}
|
||||
11
.butcher/types/PreparedInlineMessage/replace.yml
Normal file
11
.butcher/types/PreparedInlineMessage/replace.yml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
annotations:
|
||||
expiration_date:
|
||||
parsed_type:
|
||||
type: union
|
||||
items:
|
||||
- type: std
|
||||
name: datetime.datetime
|
||||
- type: std
|
||||
name: datetime.timedelta
|
||||
- type: std
|
||||
name: int
|
||||
|
|
@ -35,6 +35,30 @@
|
|||
"name": "invoice_payload",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Expiration date of the subscription, in Unix time; for recurring payments only",
|
||||
"html_description": "<td><em>Optional</em>. Expiration date of the subscription, in Unix time; for recurring payments only</td>",
|
||||
"rst_description": "*Optional*. Expiration date of the subscription, in Unix time; for recurring payments only\n",
|
||||
"name": "subscription_expiration_date",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "True",
|
||||
"description": "True, if the payment is a recurring payment for a subscription",
|
||||
"html_description": "<td><em>Optional</em>. True, if the payment is a recurring payment for a subscription</td>",
|
||||
"rst_description": "*Optional*. True, if the payment is a recurring payment for a subscription\n",
|
||||
"name": "is_recurring",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "True",
|
||||
"description": "True, if the payment is the first payment for a subscription",
|
||||
"html_description": "<td><em>Optional</em>. True, if the payment is the first payment for a subscription</td>",
|
||||
"rst_description": "*Optional*. True, if the payment is the first payment for a subscription\n",
|
||||
"name": "is_first_recurring",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Identifier of the shipping option chosen by the user",
|
||||
|
|
|
|||
|
|
@ -35,6 +35,14 @@
|
|||
"name": "invoice_payload",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "The duration of the paid subscription",
|
||||
"html_description": "<td><em>Optional</em>. The duration of the paid subscription</td>",
|
||||
"rst_description": "*Optional*. The duration of the paid subscription\n",
|
||||
"name": "subscription_period",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Array of PaidMedia",
|
||||
"description": "Information about the paid media bought by the user",
|
||||
|
|
@ -50,6 +58,14 @@
|
|||
"rst_description": "*Optional*. Bot-specified paid media payload\n",
|
||||
"name": "paid_media_payload",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "The gift sent to the user by the bot",
|
||||
"html_description": "<td><em>Optional</em>. The gift sent to the user by the bot</td>",
|
||||
"rst_description": "*Optional*. The gift sent to the user by the bot\n",
|
||||
"name": "gift",
|
||||
"required": false
|
||||
}
|
||||
],
|
||||
"category": "types"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue