-
-
Notifications
You must be signed in to change notification settings - Fork 852
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
1 parent
f2916ca
commit dfc88fc
Showing
169 changed files
with
1,890 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
7.11 | ||
8.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"meta": {}, | ||
"group": { | ||
"title": "Payments", | ||
"anchor": "payments" | ||
}, | ||
"object": { | ||
"anchor": "edituserstarsubscription", | ||
"name": "editUserStarSubscription", | ||
"description": "Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns True on success.", | ||
"html_description": "<p>Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns <em>True</em> on success.</p>", | ||
"rst_description": "Allows the bot to cancel or re-enable extension of a subscription paid in Telegram Stars. Returns :code:`True` on success.", | ||
"annotations": [ | ||
{ | ||
"type": "Integer", | ||
"required": true, | ||
"description": "Identifier of the user whose subscription will be edited", | ||
"html_description": "<td>Identifier of the user whose subscription will be edited</td>", | ||
"rst_description": "Identifier of the user whose subscription will be edited\n", | ||
"name": "user_id" | ||
}, | ||
{ | ||
"type": "String", | ||
"required": true, | ||
"description": "Telegram payment identifier for the subscription", | ||
"html_description": "<td>Telegram payment identifier for the subscription</td>", | ||
"rst_description": "Telegram payment identifier for the subscription\n", | ||
"name": "telegram_payment_charge_id" | ||
}, | ||
{ | ||
"type": "Boolean", | ||
"required": true, | ||
"description": "Pass True to cancel extension of the user subscription; the subscription must be active up to the end of the current subscription period. Pass False to allow the user to re-enable a subscription that was previously canceled by the bot.", | ||
"html_description": "<td>Pass <em>True</em> to cancel extension of the user subscription; the subscription must be active up to the end of the current subscription period. Pass <em>False</em> to allow the user to re-enable a subscription that was previously canceled by the bot.</td>", | ||
"rst_description": "Pass :code:`True` to cancel extension of the user subscription; the subscription must be active up to the end of the current subscription period. Pass :code:`False` to allow the user to re-enable a subscription that was previously canceled by the bot.\n", | ||
"name": "is_canceled" | ||
} | ||
], | ||
"category": "methods" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"meta": {}, | ||
"group": { | ||
"title": "Stickers", | ||
"anchor": "stickers" | ||
}, | ||
"object": { | ||
"anchor": "getavailablegifts", | ||
"name": "getAvailableGifts", | ||
"description": "Returns the list of gifts that can be sent by the bot to users. Requires no parameters. Returns a Gifts object.", | ||
"html_description": "<p>Returns the list of gifts that can be sent by the bot to users. Requires no parameters. Returns a <a href=\"#gifts\">Gifts</a> object.</p>", | ||
"rst_description": "Returns the list of gifts that can be sent by the bot to users. Requires no parameters. Returns a :class:`aiogram.types.gifts.Gifts` object.", | ||
"annotations": [], | ||
"category": "methods" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
{ | ||
"meta": {}, | ||
"group": { | ||
"title": "Inline mode", | ||
"anchor": "inline-mode" | ||
}, | ||
"object": { | ||
"anchor": "savepreparedinlinemessage", | ||
"name": "savePreparedInlineMessage", | ||
"description": "Stores a message that can be sent by a user of a Mini App. Returns a PreparedInlineMessage object.", | ||
"html_description": "<p>Stores a message that can be sent by a user of a Mini App. Returns a <a href=\"#preparedinlinemessage\">PreparedInlineMessage</a> object.</p>", | ||
"rst_description": "Stores a message that can be sent by a user of a Mini App. Returns a :class:`aiogram.types.prepared_inline_message.PreparedInlineMessage` object.", | ||
"annotations": [ | ||
{ | ||
"type": "Integer", | ||
"required": true, | ||
"description": "Unique identifier of the target user that can use the prepared message", | ||
"html_description": "<td>Unique identifier of the target user that can use the prepared message</td>", | ||
"rst_description": "Unique identifier of the target user that can use the prepared message\n", | ||
"name": "user_id" | ||
}, | ||
{ | ||
"type": "InlineQueryResult", | ||
"required": true, | ||
"description": "A JSON-serialized object describing the message to be sent", | ||
"html_description": "<td>A JSON-serialized object describing the message to be sent</td>", | ||
"rst_description": "A JSON-serialized object describing the message to be sent\n", | ||
"name": "result" | ||
}, | ||
{ | ||
"type": "Boolean", | ||
"required": false, | ||
"description": "Pass True if the message can be sent to private chats with users", | ||
"html_description": "<td>Pass <em>True</em> if the message can be sent to private chats with users</td>", | ||
"rst_description": "Pass :code:`True` if the message can be sent to private chats with users\n", | ||
"name": "allow_user_chats" | ||
}, | ||
{ | ||
"type": "Boolean", | ||
"required": false, | ||
"description": "Pass True if the message can be sent to private chats with bots", | ||
"html_description": "<td>Pass <em>True</em> if the message can be sent to private chats with bots</td>", | ||
"rst_description": "Pass :code:`True` if the message can be sent to private chats with bots\n", | ||
"name": "allow_bot_chats" | ||
}, | ||
{ | ||
"type": "Boolean", | ||
"required": false, | ||
"description": "Pass True if the message can be sent to group and supergroup chats", | ||
"html_description": "<td>Pass <em>True</em> if the message can be sent to group and supergroup chats</td>", | ||
"rst_description": "Pass :code:`True` if the message can be sent to group and supergroup chats\n", | ||
"name": "allow_group_chats" | ||
}, | ||
{ | ||
"type": "Boolean", | ||
"required": false, | ||
"description": "Pass True if the message can be sent to channel chats", | ||
"html_description": "<td>Pass <em>True</em> if the message can be sent to channel chats</td>", | ||
"rst_description": "Pass :code:`True` if the message can be sent to channel chats\n", | ||
"name": "allow_channel_chats" | ||
} | ||
], | ||
"category": "methods" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
"meta": {}, | ||
"group": { | ||
"title": "Stickers", | ||
"anchor": "stickers" | ||
}, | ||
"object": { | ||
"anchor": "sendgift", | ||
"name": "sendGift", | ||
"description": "Sends a gift to the given user. The gift can't be converted to Telegram Stars by the user. Returns True on success.", | ||
"html_description": "<p>Sends a gift to the given user. The gift can't be converted to Telegram Stars by the user. Returns <em>True</em> on success.</p>", | ||
"rst_description": "Sends a gift to the given user. The gift can't be converted to Telegram Stars by the user. Returns :code:`True` on success.", | ||
"annotations": [ | ||
{ | ||
"type": "Integer", | ||
"required": true, | ||
"description": "Unique identifier of the target user that will receive the gift", | ||
"html_description": "<td>Unique identifier of the target user that will receive the gift</td>", | ||
"rst_description": "Unique identifier of the target user that will receive the gift\n", | ||
"name": "user_id" | ||
}, | ||
{ | ||
"type": "String", | ||
"required": true, | ||
"description": "Identifier of the gift", | ||
"html_description": "<td>Identifier of the gift</td>", | ||
"rst_description": "Identifier of the gift\n", | ||
"name": "gift_id" | ||
}, | ||
{ | ||
"type": "String", | ||
"required": false, | ||
"description": "Text that will be shown along with the gift; 0-255 characters", | ||
"html_description": "<td>Text that will be shown along with the gift; 0-255 characters</td>", | ||
"rst_description": "Text that will be shown along with the gift; 0-255 characters\n", | ||
"name": "text" | ||
}, | ||
{ | ||
"type": "String", | ||
"required": false, | ||
"description": "Mode for parsing entities in the text. See formatting options for more details. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', and 'custom_emoji' are ignored.", | ||
"html_description": "<td>Mode for parsing entities in the text. See <a href=\"#formatting-options\">formatting options</a> for more details. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.</td>", | ||
"rst_description": "Mode for parsing entities in the text. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', and 'custom_emoji' are ignored.\n", | ||
"name": "text_parse_mode" | ||
}, | ||
{ | ||
"type": "Array of MessageEntity", | ||
"required": false, | ||
"description": "A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of text_parse_mode. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', and 'custom_emoji' are ignored.", | ||
"html_description": "<td>A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of <em>text_parse_mode</em>. Entities other than “bold”, “italic”, “underline”, “strikethrough”, “spoiler”, and “custom_emoji” are ignored.</td>", | ||
"rst_description": "A JSON-serialized list of special entities that appear in the gift text. It can be specified instead of *text_parse_mode*. Entities other than 'bold', 'italic', 'underline', 'strikethrough', 'spoiler', and 'custom_emoji' are ignored.\n", | ||
"name": "text_entities" | ||
} | ||
], | ||
"category": "methods" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
{ | ||
"meta": {}, | ||
"group": { | ||
"title": "Available methods", | ||
"anchor": "available-methods" | ||
}, | ||
"object": { | ||
"anchor": "setuseremojistatus", | ||
"name": "setUserEmojiStatus", | ||
"description": "Changes the emoji status for a given user that previously allowed the bot to manage their emoji status via the Mini App method requestEmojiStatusAccess. Returns True on success.", | ||
"html_description": "<p>Changes the emoji status for a given user that previously allowed the bot to manage their emoji status via the Mini App method <a href=\"/bots/webapps#initializing-mini-apps\">requestEmojiStatusAccess</a>. Returns <em>True</em> on success.</p>", | ||
"rst_description": "Changes the emoji status for a given user that previously allowed the bot to manage their emoji status via the Mini App method `requestEmojiStatusAccess <https://core.telegram.org/bots/webapps#initializing-mini-apps>`_. Returns :code:`True` on success.", | ||
"annotations": [ | ||
{ | ||
"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": "Custom emoji identifier of the emoji status to set. Pass an empty string to remove the status.", | ||
"html_description": "<td>Custom emoji identifier of the emoji status to set. Pass an empty string to remove the status.</td>", | ||
"rst_description": "Custom emoji identifier of the emoji status to set. Pass an empty string to remove the status.\n", | ||
"name": "emoji_status_custom_emoji_id" | ||
}, | ||
{ | ||
"type": "Integer", | ||
"required": false, | ||
"description": "Expiration date of the emoji status, if any", | ||
"html_description": "<td>Expiration date of the emoji status, if any</td>", | ||
"rst_description": "Expiration date of the emoji status, if any\n", | ||
"name": "emoji_status_expiration_date" | ||
} | ||
], | ||
"category": "methods" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
annotations: | ||
emoji_status_expiration_date: | ||
parsed_type: | ||
type: union | ||
items: | ||
- type: std | ||
name: datetime.datetime | ||
- type: std | ||
name: datetime.timedelta | ||
- type: std | ||
name: int |
Oops, something went wrong.