mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-14 02:52:12 +00:00
Added full support of Bot API 7.6 (#1533)
* Added full support of Bot API 7.6 * Fixed imports * fix tests (#1534) * Fixed coverage * Override InputPaidMedia media type to `str | InputFile` * Added shortcut * Fixed PaidMediaType enum * Added changelog --------- Co-authored-by: Oleg A <t0rr@mail.ru>
This commit is contained in:
parent
3baa7383c1
commit
11efa8e186
97 changed files with 2058 additions and 274 deletions
|
|
@ -29,49 +29,49 @@
|
|||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Video width as defined by sender",
|
||||
"html_description": "<td>Video width as defined by sender</td>",
|
||||
"rst_description": "Video width as defined by sender\n",
|
||||
"description": "Video width as defined by the sender",
|
||||
"html_description": "<td>Video width as defined by the sender</td>",
|
||||
"rst_description": "Video width as defined by the sender\n",
|
||||
"name": "width",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Video height as defined by sender",
|
||||
"html_description": "<td>Video height as defined by sender</td>",
|
||||
"rst_description": "Video height as defined by sender\n",
|
||||
"description": "Video height as defined by the sender",
|
||||
"html_description": "<td>Video height as defined by the sender</td>",
|
||||
"rst_description": "Video height as defined by the sender\n",
|
||||
"name": "height",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Duration of the video in seconds as defined by sender",
|
||||
"html_description": "<td>Duration of the video in seconds as defined by sender</td>",
|
||||
"rst_description": "Duration of the video in seconds as defined by sender\n",
|
||||
"description": "Duration of the video in seconds as defined by the sender",
|
||||
"html_description": "<td>Duration of the video in seconds as defined by the sender</td>",
|
||||
"rst_description": "Duration of the video in seconds as defined by the sender\n",
|
||||
"name": "duration",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "PhotoSize",
|
||||
"description": "Animation thumbnail as defined by sender",
|
||||
"html_description": "<td><em>Optional</em>. Animation thumbnail as defined by sender</td>",
|
||||
"rst_description": "*Optional*. Animation thumbnail as defined by sender\n",
|
||||
"description": "Animation thumbnail as defined by the sender",
|
||||
"html_description": "<td><em>Optional</em>. Animation thumbnail as defined by the sender</td>",
|
||||
"rst_description": "*Optional*. Animation thumbnail as defined by the sender\n",
|
||||
"name": "thumbnail",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Original animation filename as defined by sender",
|
||||
"html_description": "<td><em>Optional</em>. Original animation filename as defined by sender</td>",
|
||||
"rst_description": "*Optional*. Original animation filename as defined by sender\n",
|
||||
"description": "Original animation filename as defined by the sender",
|
||||
"html_description": "<td><em>Optional</em>. Original animation filename as defined by the sender</td>",
|
||||
"rst_description": "*Optional*. Original animation filename as defined by the sender\n",
|
||||
"name": "file_name",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "MIME type of the file as defined by sender",
|
||||
"html_description": "<td><em>Optional</em>. MIME type of the file as defined by sender</td>",
|
||||
"rst_description": "*Optional*. MIME type of the file as defined by sender\n",
|
||||
"description": "MIME type of the file as defined by the sender",
|
||||
"html_description": "<td><em>Optional</em>. MIME type of the file as defined by the sender</td>",
|
||||
"rst_description": "*Optional*. MIME type of the file as defined by the sender\n",
|
||||
"name": "mime_type",
|
||||
"required": false
|
||||
},
|
||||
|
|
|
|||
|
|
@ -29,41 +29,41 @@
|
|||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Duration of the audio in seconds as defined by sender",
|
||||
"html_description": "<td>Duration of the audio in seconds as defined by sender</td>",
|
||||
"rst_description": "Duration of the audio in seconds as defined by sender\n",
|
||||
"description": "Duration of the audio in seconds as defined by the sender",
|
||||
"html_description": "<td>Duration of the audio in seconds as defined by the sender</td>",
|
||||
"rst_description": "Duration of the audio in seconds as defined by the sender\n",
|
||||
"name": "duration",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Performer of the audio as defined by sender or by audio tags",
|
||||
"html_description": "<td><em>Optional</em>. Performer of the audio as defined by sender or by audio tags</td>",
|
||||
"rst_description": "*Optional*. Performer of the audio as defined by sender or by audio tags\n",
|
||||
"description": "Performer of the audio as defined by the sender or by audio tags",
|
||||
"html_description": "<td><em>Optional</em>. Performer of the audio as defined by the sender or by audio tags</td>",
|
||||
"rst_description": "*Optional*. Performer of the audio as defined by the sender or by audio tags\n",
|
||||
"name": "performer",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Title of the audio as defined by sender or by audio tags",
|
||||
"html_description": "<td><em>Optional</em>. Title of the audio as defined by sender or by audio tags</td>",
|
||||
"rst_description": "*Optional*. Title of the audio as defined by sender or by audio tags\n",
|
||||
"description": "Title of the audio as defined by the sender or by audio tags",
|
||||
"html_description": "<td><em>Optional</em>. Title of the audio as defined by the sender or by audio tags</td>",
|
||||
"rst_description": "*Optional*. Title of the audio as defined by the sender or by audio tags\n",
|
||||
"name": "title",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Original filename as defined by sender",
|
||||
"html_description": "<td><em>Optional</em>. Original filename as defined by sender</td>",
|
||||
"rst_description": "*Optional*. Original filename as defined by sender\n",
|
||||
"description": "Original filename as defined by the sender",
|
||||
"html_description": "<td><em>Optional</em>. Original filename as defined by the sender</td>",
|
||||
"rst_description": "*Optional*. Original filename as defined by the sender\n",
|
||||
"name": "file_name",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "MIME type of the file as defined by sender",
|
||||
"html_description": "<td><em>Optional</em>. MIME type of the file as defined by sender</td>",
|
||||
"rst_description": "*Optional*. MIME type of the file as defined by sender\n",
|
||||
"description": "MIME type of the file as defined by the sender",
|
||||
"html_description": "<td><em>Optional</em>. MIME type of the file as defined by the sender</td>",
|
||||
"rst_description": "*Optional*. MIME type of the file as defined by the sender\n",
|
||||
"name": "mime_type",
|
||||
"required": false
|
||||
},
|
||||
|
|
|
|||
|
|
@ -259,6 +259,14 @@
|
|||
"name": "permissions",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "True",
|
||||
"description": "True, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats.",
|
||||
"html_description": "<td><em>Optional</em>. <em>True</em>, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats.</td>",
|
||||
"rst_description": "*Optional*. :code:`True`, if paid media messages can be sent or forwarded to the channel chat. The field is available only for channel chats.\n",
|
||||
"name": "can_send_paid_media",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "For supergroups, the minimum allowed delay between consecutive messages sent by each unprivileged user; in seconds",
|
||||
|
|
|
|||
|
|
@ -29,25 +29,25 @@
|
|||
},
|
||||
{
|
||||
"type": "PhotoSize",
|
||||
"description": "Document thumbnail as defined by sender",
|
||||
"html_description": "<td><em>Optional</em>. Document thumbnail as defined by sender</td>",
|
||||
"rst_description": "*Optional*. Document thumbnail as defined by sender\n",
|
||||
"description": "Document thumbnail as defined by the sender",
|
||||
"html_description": "<td><em>Optional</em>. Document thumbnail as defined by the sender</td>",
|
||||
"rst_description": "*Optional*. Document thumbnail as defined by the sender\n",
|
||||
"name": "thumbnail",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Original filename as defined by sender",
|
||||
"html_description": "<td><em>Optional</em>. Original filename as defined by sender</td>",
|
||||
"rst_description": "*Optional*. Original filename as defined by sender\n",
|
||||
"description": "Original filename as defined by the sender",
|
||||
"html_description": "<td><em>Optional</em>. Original filename as defined by the sender</td>",
|
||||
"rst_description": "*Optional*. Original filename as defined by the sender\n",
|
||||
"name": "file_name",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "MIME type of the file as defined by sender",
|
||||
"html_description": "<td><em>Optional</em>. MIME type of the file as defined by sender</td>",
|
||||
"rst_description": "*Optional*. MIME type of the file as defined by sender\n",
|
||||
"description": "MIME type of the file as defined by the sender",
|
||||
"html_description": "<td><em>Optional</em>. MIME type of the file as defined by the sender</td>",
|
||||
"rst_description": "*Optional*. MIME type of the file as defined by the sender\n",
|
||||
"name": "mime_type",
|
||||
"required": false
|
||||
},
|
||||
|
|
|
|||
|
|
@ -67,6 +67,14 @@
|
|||
"name": "document",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "PaidMediaInfo",
|
||||
"description": "Message contains paid media; information about the paid media",
|
||||
"html_description": "<td><em>Optional</em>. Message contains paid media; information about the paid media</td>",
|
||||
"rst_description": "*Optional*. Message contains paid media; information about the paid media\n",
|
||||
"name": "paid_media",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Array of PhotoSize",
|
||||
"description": "Message is a photo, available sizes of the photo",
|
||||
|
|
|
|||
16
.butcher/types/InputPaidMedia/entity.json
Normal file
16
.butcher/types/InputPaidMedia/entity.json
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"meta": {},
|
||||
"group": {
|
||||
"title": "Available types",
|
||||
"anchor": "available-types"
|
||||
},
|
||||
"object": {
|
||||
"anchor": "inputpaidmedia",
|
||||
"name": "InputPaidMedia",
|
||||
"description": "This object describes the paid media to be sent. Currently, it can be one of\n - InputPaidMediaPhoto\n - InputPaidMediaVideo",
|
||||
"html_description": "<p>This object describes the paid media to be sent. Currently, it can be one of</p><ul>\n<li><a href=\"#inputpaidmediaphoto\">InputPaidMediaPhoto</a></li>\n<li><a href=\"#inputpaidmediavideo\">InputPaidMediaVideo</a></li>\n</ul>",
|
||||
"rst_description": "This object describes the paid media to be sent. Currently, it can be one of\n\n - :class:`aiogram.types.input_paid_media_photo.InputPaidMediaPhoto`\n - :class:`aiogram.types.input_paid_media_video.InputPaidMediaVideo`",
|
||||
"annotations": [],
|
||||
"category": "types"
|
||||
}
|
||||
}
|
||||
1
.butcher/types/InputPaidMedia/subtypes.yml
Normal file
1
.butcher/types/InputPaidMedia/subtypes.yml
Normal file
|
|
@ -0,0 +1 @@
|
|||
discriminator: "type"
|
||||
33
.butcher/types/InputPaidMediaPhoto/entity.json
Normal file
33
.butcher/types/InputPaidMediaPhoto/entity.json
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"meta": {},
|
||||
"group": {
|
||||
"title": "Available types",
|
||||
"anchor": "available-types"
|
||||
},
|
||||
"object": {
|
||||
"anchor": "inputpaidmediaphoto",
|
||||
"name": "InputPaidMediaPhoto",
|
||||
"description": "The paid media to send is a photo.",
|
||||
"html_description": "<p>The paid media to send is a photo.</p>",
|
||||
"rst_description": "The paid media to send is a photo.",
|
||||
"annotations": [
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Type of the media, must be photo",
|
||||
"html_description": "<td>Type of the media, must be <em>photo</em></td>",
|
||||
"rst_description": "Type of the media, must be *photo*\n",
|
||||
"name": "type",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://<file_attach_name>' to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files",
|
||||
"html_description": "<td>File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. <a href=\"#sending-files\">More information on Sending Files »</a></td>",
|
||||
"rst_description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://<file_attach_name>' to upload a new one using multipart/form-data under <file_attach_name> name. :ref:`More information on Sending Files » <sending-files>`\n",
|
||||
"name": "media",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"category": "types"
|
||||
}
|
||||
}
|
||||
11
.butcher/types/InputPaidMediaPhoto/replace.yml
Normal file
11
.butcher/types/InputPaidMediaPhoto/replace.yml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
annotations:
|
||||
media:
|
||||
parsed_type:
|
||||
type: union
|
||||
items:
|
||||
- type: std
|
||||
name: str
|
||||
- type: entity
|
||||
references:
|
||||
category: types
|
||||
name: InputFile
|
||||
73
.butcher/types/InputPaidMediaVideo/entity.json
Normal file
73
.butcher/types/InputPaidMediaVideo/entity.json
Normal file
|
|
@ -0,0 +1,73 @@
|
|||
{
|
||||
"meta": {},
|
||||
"group": {
|
||||
"title": "Available types",
|
||||
"anchor": "available-types"
|
||||
},
|
||||
"object": {
|
||||
"anchor": "inputpaidmediavideo",
|
||||
"name": "InputPaidMediaVideo",
|
||||
"description": "The paid media to send is a video.",
|
||||
"html_description": "<p>The paid media to send is a video.</p>",
|
||||
"rst_description": "The paid media to send is a video.",
|
||||
"annotations": [
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Type of the media, must be video",
|
||||
"html_description": "<td>Type of the media, must be <em>video</em></td>",
|
||||
"rst_description": "Type of the media, must be *video*\n",
|
||||
"name": "type",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://<file_attach_name>' to upload a new one using multipart/form-data under <file_attach_name> name. More information on Sending Files",
|
||||
"html_description": "<td>File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass “attach://<file_attach_name>” to upload a new one using multipart/form-data under <file_attach_name> name. <a href=\"#sending-files\">More information on Sending Files »</a></td>",
|
||||
"rst_description": "File to send. Pass a file_id to send a file that exists on the Telegram servers (recommended), pass an HTTP URL for Telegram to get a file from the Internet, or pass 'attach://<file_attach_name>' to upload a new one using multipart/form-data under <file_attach_name> name. :ref:`More information on Sending Files » <sending-files>`\n",
|
||||
"name": "media",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "InputFile or String",
|
||||
"description": "Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. More information on Sending Files",
|
||||
"html_description": "<td><em>Optional</em>. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass “attach://<file_attach_name>” if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. <a href=\"#sending-files\">More information on Sending Files »</a></td>",
|
||||
"rst_description": "*Optional*. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. The thumbnail should be in JPEG format and less than 200 kB in size. A thumbnail's width and height should not exceed 320. Ignored if the file is not uploaded using multipart/form-data. Thumbnails can't be reused and can be only uploaded as a new file, so you can pass 'attach://<file_attach_name>' if the thumbnail was uploaded using multipart/form-data under <file_attach_name>. :ref:`More information on Sending Files » <sending-files>`\n",
|
||||
"name": "thumbnail",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Video width",
|
||||
"html_description": "<td><em>Optional</em>. Video width</td>",
|
||||
"rst_description": "*Optional*. Video width\n",
|
||||
"name": "width",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Video height",
|
||||
"html_description": "<td><em>Optional</em>. Video height</td>",
|
||||
"rst_description": "*Optional*. Video height\n",
|
||||
"name": "height",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Video duration in seconds",
|
||||
"html_description": "<td><em>Optional</em>. Video duration in seconds</td>",
|
||||
"rst_description": "*Optional*. Video duration in seconds\n",
|
||||
"name": "duration",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Boolean",
|
||||
"description": "Pass True if the uploaded video is suitable for streaming",
|
||||
"html_description": "<td><em>Optional</em>. Pass <em>True</em> if the uploaded video is suitable for streaming</td>",
|
||||
"rst_description": "*Optional*. Pass :code:`True` if the uploaded video is suitable for streaming\n",
|
||||
"name": "supports_streaming",
|
||||
"required": false
|
||||
}
|
||||
],
|
||||
"category": "types"
|
||||
}
|
||||
}
|
||||
11
.butcher/types/InputPaidMediaVideo/replace.yml
Normal file
11
.butcher/types/InputPaidMediaVideo/replace.yml
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
annotations:
|
||||
media:
|
||||
parsed_type:
|
||||
type: union
|
||||
items:
|
||||
- type: std
|
||||
name: str
|
||||
- type: entity
|
||||
references:
|
||||
category: types
|
||||
name: InputFile
|
||||
|
|
@ -7,9 +7,9 @@
|
|||
"object": {
|
||||
"anchor": "inputpolloption",
|
||||
"name": "InputPollOption",
|
||||
"description": "This object contains information about one answer option in a poll to send.",
|
||||
"html_description": "<p>This object contains information about one answer option in a poll to send.</p>",
|
||||
"rst_description": "This object contains information about one answer option in a poll to send.",
|
||||
"description": "This object contains information about one answer option in a poll to be sent.",
|
||||
"html_description": "<p>This object contains information about one answer option in a poll to be sent.</p>",
|
||||
"rst_description": "This object contains information about one answer option in a poll to be sent.",
|
||||
"annotations": [
|
||||
{
|
||||
"type": "String",
|
||||
|
|
|
|||
|
|
@ -13,17 +13,17 @@
|
|||
"annotations": [
|
||||
{
|
||||
"type": "Float",
|
||||
"description": "Latitude as defined by sender",
|
||||
"html_description": "<td>Latitude as defined by sender</td>",
|
||||
"rst_description": "Latitude as defined by sender\n",
|
||||
"description": "Latitude as defined by the sender",
|
||||
"html_description": "<td>Latitude as defined by the sender</td>",
|
||||
"rst_description": "Latitude as defined by the sender\n",
|
||||
"name": "latitude",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "Float",
|
||||
"description": "Longitude as defined by sender",
|
||||
"html_description": "<td>Longitude as defined by sender</td>",
|
||||
"rst_description": "Longitude as defined by sender\n",
|
||||
"description": "Longitude as defined by the sender",
|
||||
"html_description": "<td>Longitude as defined by the sender</td>",
|
||||
"rst_description": "Longitude as defined by the sender\n",
|
||||
"name": "longitude",
|
||||
"required": true
|
||||
},
|
||||
|
|
|
|||
|
|
@ -29,9 +29,9 @@
|
|||
},
|
||||
{
|
||||
"type": "WebAppInfo",
|
||||
"description": "Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery.",
|
||||
"html_description": "<td>Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method <a href=\"#answerwebappquery\">answerWebAppQuery</a>.</td>",
|
||||
"rst_description": "Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method :class:`aiogram.methods.answer_web_app_query.AnswerWebAppQuery`.\n",
|
||||
"description": "Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method answerWebAppQuery. Alternatively, a t.me link to a Web App of the bot can be specified in the object instead of the Web App's URL, in which case the Web App will be opened as if the user pressed the link.",
|
||||
"html_description": "<td>Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method <a href=\"#answerwebappquery\">answerWebAppQuery</a>. Alternatively, a <code>t.me</code> link to a Web App of the bot can be specified in the object instead of the Web App's URL, in which case the Web App will be opened as if the user pressed the link.</td>",
|
||||
"rst_description": "Description of the Web App that will be launched when the user presses the button. The Web App will be able to send an arbitrary message on behalf of the user using the method :class:`aiogram.methods.answer_web_app_query.AnswerWebAppQuery`. Alternatively, a :code:`t.me` link to a Web App of the bot can be specified in the object instead of the Web App's URL, in which case the Web App will be opened as if the user pressed the link.\n",
|
||||
"name": "web_app",
|
||||
"required": true
|
||||
}
|
||||
|
|
|
|||
|
|
@ -174,6 +174,11 @@ reply_voice:
|
|||
code: *assert-chat
|
||||
fill: *fill-reply
|
||||
|
||||
answer_paid_media:
|
||||
method: sendPaidMedia
|
||||
code: *assert-chat
|
||||
fill: *fill-answer
|
||||
|
||||
copy_to:
|
||||
method: copyMessage
|
||||
code: *assert-chat
|
||||
|
|
|
|||
|
|
@ -243,6 +243,14 @@
|
|||
"name": "document",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "PaidMediaInfo",
|
||||
"description": "Message contains paid media; information about the paid media",
|
||||
"html_description": "<td><em>Optional</em>. Message contains paid media; information about the paid media</td>",
|
||||
"rst_description": "*Optional*. Message contains paid media; information about the paid media\n",
|
||||
"name": "paid_media",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Array of PhotoSize",
|
||||
"description": "Message is a photo, available sizes of the photo",
|
||||
|
|
@ -293,9 +301,9 @@
|
|||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Caption for the animation, audio, document, photo, video or voice",
|
||||
"html_description": "<td><em>Optional</em>. Caption for the animation, audio, document, photo, video or voice</td>",
|
||||
"rst_description": "*Optional*. Caption for the animation, audio, document, photo, video or voice\n",
|
||||
"description": "Caption for the animation, audio, document, paid media, photo, video or voice",
|
||||
"html_description": "<td><em>Optional</em>. Caption for the animation, audio, document, paid media, photo, video or voice</td>",
|
||||
"rst_description": "*Optional*. Caption for the animation, audio, document, paid media, photo, video or voice\n",
|
||||
"name": "caption",
|
||||
"required": false
|
||||
},
|
||||
|
|
|
|||
16
.butcher/types/PaidMedia/entity.json
Normal file
16
.butcher/types/PaidMedia/entity.json
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{
|
||||
"meta": {},
|
||||
"group": {
|
||||
"title": "Available types",
|
||||
"anchor": "available-types"
|
||||
},
|
||||
"object": {
|
||||
"anchor": "paidmedia",
|
||||
"name": "PaidMedia",
|
||||
"description": "This object describes paid media. Currently, it can be one of\n - PaidMediaPreview\n - PaidMediaPhoto\n - PaidMediaVideo",
|
||||
"html_description": "<p>This object describes paid media. Currently, it can be one of</p><ul>\n<li><a href=\"#paidmediapreview\">PaidMediaPreview</a></li>\n<li><a href=\"#paidmediaphoto\">PaidMediaPhoto</a></li>\n<li><a href=\"#paidmediavideo\">PaidMediaVideo</a></li>\n</ul>",
|
||||
"rst_description": "This object describes paid media. Currently, it can be one of\n\n - :class:`aiogram.types.paid_media_preview.PaidMediaPreview`\n - :class:`aiogram.types.paid_media_photo.PaidMediaPhoto`\n - :class:`aiogram.types.paid_media_video.PaidMediaVideo`",
|
||||
"annotations": [],
|
||||
"category": "types"
|
||||
}
|
||||
}
|
||||
1
.butcher/types/PaidMedia/subtypes.yml
Normal file
1
.butcher/types/PaidMedia/subtypes.yml
Normal file
|
|
@ -0,0 +1 @@
|
|||
discriminator: "type"
|
||||
33
.butcher/types/PaidMediaInfo/entity.json
Normal file
33
.butcher/types/PaidMediaInfo/entity.json
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"meta": {},
|
||||
"group": {
|
||||
"title": "Available types",
|
||||
"anchor": "available-types"
|
||||
},
|
||||
"object": {
|
||||
"anchor": "paidmediainfo",
|
||||
"name": "PaidMediaInfo",
|
||||
"description": "Describes the paid media added to a message.",
|
||||
"html_description": "<p>Describes the paid media added to a message.</p>",
|
||||
"rst_description": "Describes the paid media added to a message.",
|
||||
"annotations": [
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "The number of Telegram Stars that must be paid to buy access to the media",
|
||||
"html_description": "<td>The number of Telegram Stars that must be paid to buy access to the media</td>",
|
||||
"rst_description": "The number of Telegram Stars that must be paid to buy access to the media\n",
|
||||
"name": "star_count",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "Array of PaidMedia",
|
||||
"description": "Information about the paid media",
|
||||
"html_description": "<td>Information about the paid media</td>",
|
||||
"rst_description": "Information about the paid media\n",
|
||||
"name": "paid_media",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"category": "types"
|
||||
}
|
||||
}
|
||||
33
.butcher/types/PaidMediaPhoto/entity.json
Normal file
33
.butcher/types/PaidMediaPhoto/entity.json
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"meta": {},
|
||||
"group": {
|
||||
"title": "Available types",
|
||||
"anchor": "available-types"
|
||||
},
|
||||
"object": {
|
||||
"anchor": "paidmediaphoto",
|
||||
"name": "PaidMediaPhoto",
|
||||
"description": "The paid media is a photo.",
|
||||
"html_description": "<p>The paid media is a photo.</p>",
|
||||
"rst_description": "The paid media is a photo.",
|
||||
"annotations": [
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Type of the paid media, always 'photo'",
|
||||
"html_description": "<td>Type of the paid media, always “photo”</td>",
|
||||
"rst_description": "Type of the paid media, always 'photo'\n",
|
||||
"name": "type",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "Array of PhotoSize",
|
||||
"description": "The photo",
|
||||
"html_description": "<td>The photo</td>",
|
||||
"rst_description": "The photo\n",
|
||||
"name": "photo",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"category": "types"
|
||||
}
|
||||
}
|
||||
49
.butcher/types/PaidMediaPreview/entity.json
Normal file
49
.butcher/types/PaidMediaPreview/entity.json
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
{
|
||||
"meta": {},
|
||||
"group": {
|
||||
"title": "Available types",
|
||||
"anchor": "available-types"
|
||||
},
|
||||
"object": {
|
||||
"anchor": "paidmediapreview",
|
||||
"name": "PaidMediaPreview",
|
||||
"description": "The paid media isn't available before the payment.",
|
||||
"html_description": "<p>The paid media isn't available before the payment.</p>",
|
||||
"rst_description": "The paid media isn't available before the payment.",
|
||||
"annotations": [
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Type of the paid media, always 'preview'",
|
||||
"html_description": "<td>Type of the paid media, always “preview”</td>",
|
||||
"rst_description": "Type of the paid media, always 'preview'\n",
|
||||
"name": "type",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Media width as defined by the sender",
|
||||
"html_description": "<td><em>Optional</em>. Media width as defined by the sender</td>",
|
||||
"rst_description": "*Optional*. Media width as defined by the sender\n",
|
||||
"name": "width",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Media height as defined by the sender",
|
||||
"html_description": "<td><em>Optional</em>. Media height as defined by the sender</td>",
|
||||
"rst_description": "*Optional*. Media height as defined by the sender\n",
|
||||
"name": "height",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Duration of the media in seconds as defined by the sender",
|
||||
"html_description": "<td><em>Optional</em>. Duration of the media in seconds as defined by the sender</td>",
|
||||
"rst_description": "*Optional*. Duration of the media in seconds as defined by the sender\n",
|
||||
"name": "duration",
|
||||
"required": false
|
||||
}
|
||||
],
|
||||
"category": "types"
|
||||
}
|
||||
}
|
||||
33
.butcher/types/PaidMediaVideo/entity.json
Normal file
33
.butcher/types/PaidMediaVideo/entity.json
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
{
|
||||
"meta": {},
|
||||
"group": {
|
||||
"title": "Available types",
|
||||
"anchor": "available-types"
|
||||
},
|
||||
"object": {
|
||||
"anchor": "paidmediavideo",
|
||||
"name": "PaidMediaVideo",
|
||||
"description": "The paid media is a video.",
|
||||
"html_description": "<p>The paid media is a video.</p>",
|
||||
"rst_description": "The paid media is a video.",
|
||||
"annotations": [
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Type of the paid media, always 'video'",
|
||||
"html_description": "<td>Type of the paid media, always “video”</td>",
|
||||
"rst_description": "Type of the paid media, always 'video'\n",
|
||||
"name": "type",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "Video",
|
||||
"description": "The video",
|
||||
"html_description": "<td>The video</td>",
|
||||
"rst_description": "The video\n",
|
||||
"name": "video",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"category": "types"
|
||||
}
|
||||
}
|
||||
|
|
@ -45,9 +45,9 @@
|
|||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Bot specified invoice payload",
|
||||
"html_description": "<td>Bot specified invoice payload</td>",
|
||||
"rst_description": "Bot specified invoice payload\n",
|
||||
"description": "Bot-specified invoice payload",
|
||||
"html_description": "<td>Bot-specified invoice payload</td>",
|
||||
"rst_description": "Bot-specified invoice payload\n",
|
||||
"name": "invoice_payload",
|
||||
"required": true
|
||||
},
|
||||
|
|
|
|||
|
|
@ -29,9 +29,9 @@
|
|||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Bot specified invoice payload",
|
||||
"html_description": "<td>Bot specified invoice payload</td>",
|
||||
"rst_description": "Bot specified invoice payload\n",
|
||||
"description": "Bot-specified invoice payload",
|
||||
"html_description": "<td>Bot-specified invoice payload</td>",
|
||||
"rst_description": "Bot-specified invoice payload\n",
|
||||
"name": "invoice_payload",
|
||||
"required": true
|
||||
},
|
||||
|
|
|
|||
|
|
@ -29,9 +29,9 @@
|
|||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Bot specified invoice payload",
|
||||
"html_description": "<td>Bot specified invoice payload</td>",
|
||||
"rst_description": "Bot specified invoice payload\n",
|
||||
"description": "Bot-specified invoice payload",
|
||||
"html_description": "<td>Bot-specified invoice payload</td>",
|
||||
"rst_description": "Bot-specified invoice payload\n",
|
||||
"name": "invoice_payload",
|
||||
"required": true
|
||||
},
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@
|
|||
"object": {
|
||||
"anchor": "transactionpartner",
|
||||
"name": "TransactionPartner",
|
||||
"description": "This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of\n - TransactionPartnerFragment\n - TransactionPartnerUser\n - TransactionPartnerOther",
|
||||
"html_description": "<p>This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of</p><ul>\n<li><a href=\"#transactionpartnerfragment\">TransactionPartnerFragment</a></li>\n<li><a href=\"#transactionpartneruser\">TransactionPartnerUser</a></li>\n<li><a href=\"#transactionpartnerother\">TransactionPartnerOther</a></li>\n</ul>",
|
||||
"rst_description": "This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of\n\n - :class:`aiogram.types.transaction_partner_fragment.TransactionPartnerFragment`\n - :class:`aiogram.types.transaction_partner_user.TransactionPartnerUser`\n - :class:`aiogram.types.transaction_partner_other.TransactionPartnerOther`",
|
||||
"description": "This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of\n - TransactionPartnerUser\n - TransactionPartnerFragment\n - TransactionPartnerTelegramAds\n - TransactionPartnerOther",
|
||||
"html_description": "<p>This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of</p><ul>\n<li><a href=\"#transactionpartneruser\">TransactionPartnerUser</a></li>\n<li><a href=\"#transactionpartnerfragment\">TransactionPartnerFragment</a></li>\n<li><a href=\"#transactionpartnertelegramads\">TransactionPartnerTelegramAds</a></li>\n<li><a href=\"#transactionpartnerother\">TransactionPartnerOther</a></li>\n</ul>",
|
||||
"rst_description": "This object describes the source of a transaction, or its recipient for outgoing transactions. Currently, it can be one of\n\n - :class:`aiogram.types.transaction_partner_user.TransactionPartnerUser`\n - :class:`aiogram.types.transaction_partner_fragment.TransactionPartnerFragment`\n - :class:`aiogram.types.transaction_partner_telegram_ads.TransactionPartnerTelegramAds`\n - :class:`aiogram.types.transaction_partner_other.TransactionPartnerOther`",
|
||||
"annotations": [],
|
||||
"category": "types"
|
||||
}
|
||||
|
|
|
|||
25
.butcher/types/TransactionPartnerTelegramAds/entity.json
Normal file
25
.butcher/types/TransactionPartnerTelegramAds/entity.json
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"meta": {},
|
||||
"group": {
|
||||
"title": "Payments",
|
||||
"anchor": "payments"
|
||||
},
|
||||
"object": {
|
||||
"anchor": "transactionpartnertelegramads",
|
||||
"name": "TransactionPartnerTelegramAds",
|
||||
"description": "Describes a withdrawal transaction to the Telegram Ads platform.",
|
||||
"html_description": "<p>Describes a withdrawal transaction to the Telegram Ads platform.</p>",
|
||||
"rst_description": "Describes a withdrawal transaction to the Telegram Ads platform.",
|
||||
"annotations": [
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Type of the transaction partner, always 'telegram_ads'",
|
||||
"html_description": "<td>Type of the transaction partner, always “telegram_ads”</td>",
|
||||
"rst_description": "Type of the transaction partner, always 'telegram_ads'\n",
|
||||
"name": "type",
|
||||
"required": true
|
||||
}
|
||||
],
|
||||
"category": "types"
|
||||
}
|
||||
}
|
||||
|
|
@ -26,6 +26,14 @@
|
|||
"rst_description": "Information about the user\n",
|
||||
"name": "user",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Bot-specified invoice payload",
|
||||
"html_description": "<td><em>Optional</em>. Bot-specified invoice payload</td>",
|
||||
"rst_description": "*Optional*. Bot-specified invoice payload\n",
|
||||
"name": "invoice_payload",
|
||||
"required": false
|
||||
}
|
||||
],
|
||||
"category": "types"
|
||||
|
|
|
|||
|
|
@ -29,25 +29,25 @@
|
|||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Video width as defined by sender",
|
||||
"html_description": "<td>Video width as defined by sender</td>",
|
||||
"rst_description": "Video width as defined by sender\n",
|
||||
"description": "Video width as defined by the sender",
|
||||
"html_description": "<td>Video width as defined by the sender</td>",
|
||||
"rst_description": "Video width as defined by the sender\n",
|
||||
"name": "width",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Video height as defined by sender",
|
||||
"html_description": "<td>Video height as defined by sender</td>",
|
||||
"rst_description": "Video height as defined by sender\n",
|
||||
"description": "Video height as defined by the sender",
|
||||
"html_description": "<td>Video height as defined by the sender</td>",
|
||||
"rst_description": "Video height as defined by the sender\n",
|
||||
"name": "height",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Duration of the video in seconds as defined by sender",
|
||||
"html_description": "<td>Duration of the video in seconds as defined by sender</td>",
|
||||
"rst_description": "Duration of the video in seconds as defined by sender\n",
|
||||
"description": "Duration of the video in seconds as defined by the sender",
|
||||
"html_description": "<td>Duration of the video in seconds as defined by the sender</td>",
|
||||
"rst_description": "Duration of the video in seconds as defined by the sender\n",
|
||||
"name": "duration",
|
||||
"required": true
|
||||
},
|
||||
|
|
@ -61,17 +61,17 @@
|
|||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Original filename as defined by sender",
|
||||
"html_description": "<td><em>Optional</em>. Original filename as defined by sender</td>",
|
||||
"rst_description": "*Optional*. Original filename as defined by sender\n",
|
||||
"description": "Original filename as defined by the sender",
|
||||
"html_description": "<td><em>Optional</em>. Original filename as defined by the sender</td>",
|
||||
"rst_description": "*Optional*. Original filename as defined by the sender\n",
|
||||
"name": "file_name",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "MIME type of the file as defined by sender",
|
||||
"html_description": "<td><em>Optional</em>. MIME type of the file as defined by sender</td>",
|
||||
"rst_description": "*Optional*. MIME type of the file as defined by sender\n",
|
||||
"description": "MIME type of the file as defined by the sender",
|
||||
"html_description": "<td><em>Optional</em>. MIME type of the file as defined by the sender</td>",
|
||||
"rst_description": "*Optional*. MIME type of the file as defined by the sender\n",
|
||||
"name": "mime_type",
|
||||
"required": false
|
||||
},
|
||||
|
|
|
|||
|
|
@ -29,17 +29,17 @@
|
|||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Video width and height (diameter of the video message) as defined by sender",
|
||||
"html_description": "<td>Video width and height (diameter of the video message) as defined by sender</td>",
|
||||
"rst_description": "Video width and height (diameter of the video message) as defined by sender\n",
|
||||
"description": "Video width and height (diameter of the video message) as defined by the sender",
|
||||
"html_description": "<td>Video width and height (diameter of the video message) as defined by the sender</td>",
|
||||
"rst_description": "Video width and height (diameter of the video message) as defined by the sender\n",
|
||||
"name": "length",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Duration of the video in seconds as defined by sender",
|
||||
"html_description": "<td>Duration of the video in seconds as defined by sender</td>",
|
||||
"rst_description": "Duration of the video in seconds as defined by sender\n",
|
||||
"description": "Duration of the video in seconds as defined by the sender",
|
||||
"html_description": "<td>Duration of the video in seconds as defined by the sender</td>",
|
||||
"rst_description": "Duration of the video in seconds as defined by the sender\n",
|
||||
"name": "duration",
|
||||
"required": true
|
||||
},
|
||||
|
|
|
|||
|
|
@ -29,17 +29,17 @@
|
|||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Duration of the audio in seconds as defined by sender",
|
||||
"html_description": "<td>Duration of the audio in seconds as defined by sender</td>",
|
||||
"rst_description": "Duration of the audio in seconds as defined by sender\n",
|
||||
"description": "Duration of the audio in seconds as defined by the sender",
|
||||
"html_description": "<td>Duration of the audio in seconds as defined by the sender</td>",
|
||||
"rst_description": "Duration of the audio in seconds as defined by the sender\n",
|
||||
"name": "duration",
|
||||
"required": true
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "MIME type of the file as defined by sender",
|
||||
"html_description": "<td><em>Optional</em>. MIME type of the file as defined by sender</td>",
|
||||
"rst_description": "*Optional*. MIME type of the file as defined by sender\n",
|
||||
"description": "MIME type of the file as defined by the sender",
|
||||
"html_description": "<td><em>Optional</em>. MIME type of the file as defined by the sender</td>",
|
||||
"rst_description": "*Optional*. MIME type of the file as defined by the sender\n",
|
||||
"name": "mime_type",
|
||||
"required": false
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue