mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-16 12:07:13 +00:00
Bot API 7.10 (#1570)
* Bump to the latest schema * Added full support ob Bot API 7.10 * Add support for purchased paid media events Enhanced the router to include `purchased_paid_media` handling. Added corresponding test cases to verify the new functionality and updated middleware to return the appropriate `EventContext`. * Added changelog
This commit is contained in:
parent
fb1e5cad59
commit
e8fc890809
40 changed files with 487 additions and 106 deletions
|
|
@ -7,9 +7,9 @@
|
|||
"object": {
|
||||
"anchor": "chatboostsourcegiveaway",
|
||||
"name": "ChatBoostSourceGiveaway",
|
||||
"description": "The boost was obtained by the creation of a Telegram Premium giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.",
|
||||
"html_description": "<p>The boost was obtained by the creation of a Telegram Premium giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.</p>",
|
||||
"rst_description": "The boost was obtained by the creation of a Telegram Premium giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription.",
|
||||
"description": "The boost was obtained by the creation of a Telegram Premium or a Telegram Star giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription for Telegram Premium giveaways and prize_star_count / 500 times for one year for Telegram Star giveaways.",
|
||||
"html_description": "<p>The boost was obtained by the creation of a Telegram Premium or a Telegram Star giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription for Telegram Premium giveaways and <em>prize_star_count</em> / 500 times for one year for Telegram Star giveaways.</p>",
|
||||
"rst_description": "The boost was obtained by the creation of a Telegram Premium or a Telegram Star giveaway. This boosts the chat 4 times for the duration of the corresponding Telegram Premium subscription for Telegram Premium giveaways and *prize_star_count* / 500 times for one year for Telegram Star giveaways.",
|
||||
"annotations": [
|
||||
{
|
||||
"type": "String",
|
||||
|
|
@ -29,12 +29,20 @@
|
|||
},
|
||||
{
|
||||
"type": "User",
|
||||
"description": "User that won the prize in the giveaway if any",
|
||||
"html_description": "<td><em>Optional</em>. User that won the prize in the giveaway if any</td>",
|
||||
"rst_description": "*Optional*. User that won the prize in the giveaway if any\n",
|
||||
"description": "User that won the prize in the giveaway if any; for Telegram Premium giveaways only",
|
||||
"html_description": "<td><em>Optional</em>. User that won the prize in the giveaway if any; for Telegram Premium giveaways only</td>",
|
||||
"rst_description": "*Optional*. User that won the prize in the giveaway if any; for Telegram Premium giveaways only\n",
|
||||
"name": "user",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only",
|
||||
"html_description": "<td><em>Optional</em>. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only</td>",
|
||||
"rst_description": "*Optional*. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only\n",
|
||||
"name": "prize_star_count",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "True",
|
||||
"description": "True, if the giveaway was completed, but there was no user to win the prize",
|
||||
|
|
|
|||
|
|
@ -82,6 +82,22 @@
|
|||
"rst_description": "*Optional*. Number of pending join requests created using this link\n",
|
||||
"name": "pending_join_request_count",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "The number of seconds the subscription will be active for before the next payment",
|
||||
"html_description": "<td><em>Optional</em>. The number of seconds the subscription will be active for before the next payment</td>",
|
||||
"rst_description": "*Optional*. The number of seconds the subscription will be active for before the next payment\n",
|
||||
"name": "subscription_period",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link",
|
||||
"html_description": "<td><em>Optional</em>. The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link</td>",
|
||||
"rst_description": "*Optional*. The amount of Telegram Stars a user must pay initially and after each subsequent subscription period to be a member of the chat using the link\n",
|
||||
"name": "subscription_price",
|
||||
"required": false
|
||||
}
|
||||
],
|
||||
"category": "types"
|
||||
|
|
|
|||
|
|
@ -69,9 +69,17 @@
|
|||
},
|
||||
{
|
||||
"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",
|
||||
"description": "The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only",
|
||||
"html_description": "<td><em>Optional</em>. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only</td>",
|
||||
"rst_description": "*Optional*. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only\n",
|
||||
"name": "prize_star_count",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only",
|
||||
"html_description": "<td><em>Optional</em>. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only</td>",
|
||||
"rst_description": "*Optional*. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only\n",
|
||||
"name": "premium_subscription_month_count",
|
||||
"required": false
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,14 @@
|
|||
"rst_description": "*Optional*. Message with the giveaway that was completed, if it wasn't deleted\n",
|
||||
"name": "giveaway_message",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "True",
|
||||
"description": "True, if the giveaway is a Telegram Star giveaway. Otherwise, currently, the giveaway is a Telegram Premium giveaway.",
|
||||
"html_description": "<td><em>Optional</em>. <em>True</em>, if the giveaway is a Telegram Star giveaway. Otherwise, currently, the giveaway is a Telegram Premium giveaway.</td>",
|
||||
"rst_description": "*Optional*. :code:`True`, if the giveaway is a Telegram Star giveaway. Otherwise, currently, the giveaway is a Telegram Premium giveaway.\n",
|
||||
"name": "is_star_giveaway",
|
||||
"required": false
|
||||
}
|
||||
],
|
||||
"category": "types"
|
||||
|
|
|
|||
|
|
@ -7,10 +7,19 @@
|
|||
"object": {
|
||||
"anchor": "giveawaycreated",
|
||||
"name": "GiveawayCreated",
|
||||
"description": "This object represents a service message about the creation of a scheduled giveaway. Currently holds no information.",
|
||||
"html_description": "<p>This object represents a service message about the creation of a scheduled giveaway. Currently holds no information.</p>",
|
||||
"rst_description": "This object represents a service message about the creation of a scheduled giveaway. Currently holds no information.",
|
||||
"annotations": [],
|
||||
"description": "This object represents a service message about the creation of a scheduled giveaway.",
|
||||
"html_description": "<p>This object represents a service message about the creation of a scheduled giveaway.</p>",
|
||||
"rst_description": "This object represents a service message about the creation of a scheduled giveaway.",
|
||||
"annotations": [
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only",
|
||||
"html_description": "<td><em>Optional</em>. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only</td>",
|
||||
"rst_description": "*Optional*. The number of Telegram Stars to be split between giveaway winners; for Telegram Star giveaways only\n",
|
||||
"name": "prize_star_count",
|
||||
"required": false
|
||||
}
|
||||
],
|
||||
"category": "types"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -61,9 +61,17 @@
|
|||
},
|
||||
{
|
||||
"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",
|
||||
"description": "The number of Telegram Stars that were split between giveaway winners; for Telegram Star giveaways only",
|
||||
"html_description": "<td><em>Optional</em>. The number of Telegram Stars that were split between giveaway winners; for Telegram Star giveaways only</td>",
|
||||
"rst_description": "*Optional*. The number of Telegram Stars that were split between giveaway winners; for Telegram Star giveaways only\n",
|
||||
"name": "prize_star_count",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only",
|
||||
"html_description": "<td><em>Optional</em>. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only</td>",
|
||||
"rst_description": "*Optional*. The number of months the Telegram Premium subscription won from the giveaway will be active for; for Telegram Premium giveaways only\n",
|
||||
"name": "premium_subscription_month_count",
|
||||
"required": false
|
||||
},
|
||||
|
|
|
|||
|
|
@ -29,9 +29,9 @@
|
|||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.",
|
||||
"html_description": "<td>Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.</td>",
|
||||
"rst_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use for your internal processes.\n",
|
||||
"description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.",
|
||||
"html_description": "<td>Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.</td>",
|
||||
"rst_description": "Bot-defined invoice payload, 1-128 bytes. This will not be displayed to the user, use it for your internal processes.\n",
|
||||
"name": "payload",
|
||||
"required": true
|
||||
},
|
||||
|
|
|
|||
33
.butcher/types/PaidMediaPurchased/entity.json
Normal file
33
.butcher/types/PaidMediaPurchased/entity.json
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"meta": {},
|
||||
"group": {
|
||||
"title": "Payments",
|
||||
"anchor": "payments"
|
||||
},
|
||||
"object": {
|
||||
"anchor": "paidmediapurchased",
|
||||
"name": "PaidMediaPurchased",
|
||||
"description": "This object contains information about a paid media purchase.",
|
||||
"html_description": "<p>This object contains information about a paid media purchase.</p>",
|
||||
"rst_description": "This object contains information about a paid media purchase.",
|
||||
"annotations": [
|
||||
{
|
||||
"type": "User",
|
||||
"description": "User who purchased the media",
|
||||
"html_description": "<td>User who purchased the media</td>",
|
||||
"rst_description": "User who purchased the media\n",
|
||||
"name": "from",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Bot-specified paid media payload",
|
||||
"html_description": "<td>Bot-specified paid media payload</td>",
|
||||
"rst_description": "Bot-specified paid media payload\n",
|
||||
"name": "paid_media_payload",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"category": "types"
|
||||
}
|
||||
}
|
||||
|
|
@ -42,6 +42,14 @@
|
|||
"rst_description": "*Optional*. Information about the paid media bought by the user\n",
|
||||
"name": "paid_media",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Bot-specified paid media payload",
|
||||
"html_description": "<td><em>Optional</em>. Bot-specified paid media payload</td>",
|
||||
"rst_description": "*Optional*. Bot-specified paid media payload\n",
|
||||
"name": "paid_media_payload",
|
||||
"required": false
|
||||
}
|
||||
],
|
||||
"category": "types"
|
||||
|
|
|
|||
|
|
@ -139,6 +139,14 @@
|
|||
"name": "pre_checkout_query",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "PaidMediaPurchased",
|
||||
"description": "A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat",
|
||||
"html_description": "<td><em>Optional</em>. A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat</td>",
|
||||
"rst_description": "*Optional*. A user purchased paid media with a non-empty payload sent by the bot in a non-channel chat\n",
|
||||
"name": "purchased_paid_media",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Poll",
|
||||
"description": "New poll state. Bots receive only updates about manually stopped polls and polls, which are sent by the bot",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue