mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-14 10:53:23 +00:00
Adding new code-generator (Butcher) (#1069)
* Re-generate types * Re-generate methods (only attributes) * Added enums * Base init generator * Added butcher configs * Fixed tests, bump butcher * Added changelog * Added enum docs * Added templates for docs index * Re-generate bot class, remove deprecated methods
This commit is contained in:
parent
c7779abc50
commit
d034c1ba9f
387 changed files with 32036 additions and 3144 deletions
91
.butcher/types/InputMediaAnimation/entity.json
Normal file
91
.butcher/types/InputMediaAnimation/entity.json
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
{
|
||||
"meta": {
|
||||
"deprecated": false
|
||||
},
|
||||
"group": {
|
||||
"title": "Available types",
|
||||
"anchor": "available-types"
|
||||
},
|
||||
"object": {
|
||||
"anchor": "inputmediaanimation",
|
||||
"name": "InputMediaAnimation",
|
||||
"description": "Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.",
|
||||
"html_description": "<p>Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.</p>",
|
||||
"rst_description": "Represents an animation file (GIF or H.264/MPEG-4 AVC video without sound) to be sent.",
|
||||
"annotations": [
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Type of the result, must be animation",
|
||||
"html_description": "<td>Type of the result, must be <em>animation</em></td>",
|
||||
"rst_description": "Type of the result, must be *animation*\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": "thumb",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Caption of the animation to be sent, 0-1024 characters after entities parsing",
|
||||
"html_description": "<td><em>Optional</em>. Caption of the animation to be sent, 0-1024 characters after entities parsing</td>",
|
||||
"rst_description": "*Optional*. Caption of the animation to be sent, 0-1024 characters after entities parsing\n",
|
||||
"name": "caption",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "String",
|
||||
"description": "Mode for parsing entities in the animation caption. See formatting options for more details.",
|
||||
"html_description": "<td><em>Optional</em>. Mode for parsing entities in the animation caption. See <a href=\"#formatting-options\">formatting options</a> for more details.</td>",
|
||||
"rst_description": "*Optional*. Mode for parsing entities in the animation caption. See `formatting options <https://core.telegram.org/bots/api#formatting-options>`_ for more details.\n",
|
||||
"name": "parse_mode",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Array of MessageEntity",
|
||||
"description": "List of special entities that appear in the caption, which can be specified instead of parse_mode",
|
||||
"html_description": "<td><em>Optional</em>. List of special entities that appear in the caption, which can be specified instead of <em>parse_mode</em></td>",
|
||||
"rst_description": "*Optional*. List of special entities that appear in the caption, which can be specified instead of *parse_mode*\n",
|
||||
"name": "caption_entities",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Animation width",
|
||||
"html_description": "<td><em>Optional</em>. Animation width</td>",
|
||||
"rst_description": "*Optional*. Animation width\n",
|
||||
"name": "width",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Animation height",
|
||||
"html_description": "<td><em>Optional</em>. Animation height</td>",
|
||||
"rst_description": "*Optional*. Animation height\n",
|
||||
"name": "height",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"type": "Integer",
|
||||
"description": "Animation duration in seconds",
|
||||
"html_description": "<td><em>Optional</em>. Animation duration in seconds</td>",
|
||||
"rst_description": "*Optional*. Animation duration in seconds\n",
|
||||
"name": "duration",
|
||||
"required": false
|
||||
}
|
||||
],
|
||||
"category": "types"
|
||||
}
|
||||
}
|
||||
15
.butcher/types/InputMediaAnimation/replace.yml
Normal file
15
.butcher/types/InputMediaAnimation/replace.yml
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
bases:
|
||||
- InputMedia
|
||||
annotations:
|
||||
media:
|
||||
parsed_type:
|
||||
type: union
|
||||
items:
|
||||
- type: std
|
||||
name: str
|
||||
- type: entity
|
||||
references:
|
||||
category: types
|
||||
name: InputFile
|
||||
parse_mode:
|
||||
value: UNSET
|
||||
Loading…
Add table
Add a link
Reference in a new issue