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:
Alex Root Junior 2022-11-21 01:06:55 +02:00 committed by GitHub
parent c7779abc50
commit d034c1ba9f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
387 changed files with 32036 additions and 3144 deletions

View file

@ -0,0 +1,59 @@
{
"meta": {
"deprecated": false
},
"group": {
"title": "Available types",
"anchor": "available-types"
},
"object": {
"anchor": "inputmediaphoto",
"name": "InputMediaPhoto",
"description": "Represents a photo to be sent.",
"html_description": "<p>Represents a photo to be sent.</p>",
"rst_description": "Represents a photo to be sent.",
"annotations": [
{
"type": "String",
"description": "Type of the result, must be photo",
"html_description": "<td>Type of the result, must be <em>photo</em></td>",
"rst_description": "Type of the result, 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 &#8220;attach://&lt;file_attach_name&gt;&#8221; to upload a new one using multipart/form-data under &lt;file_attach_name&gt; name. <a href=\"#sending-files\">More information on Sending Files &#187;</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": "String",
"description": "Caption of the photo to be sent, 0-1024 characters after entities parsing",
"html_description": "<td><em>Optional</em>. Caption of the photo to be sent, 0-1024 characters after entities parsing</td>",
"rst_description": "*Optional*. Caption of the photo to be sent, 0-1024 characters after entities parsing\n",
"name": "caption",
"required": false
},
{
"type": "String",
"description": "Mode for parsing entities in the photo caption. See formatting options for more details.",
"html_description": "<td><em>Optional</em>. Mode for parsing entities in the photo caption. See <a href=\"#formatting-options\">formatting options</a> for more details.</td>",
"rst_description": "*Optional*. Mode for parsing entities in the photo 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
}
],
"category": "types"
}
}

View 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