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,139 @@
{
"meta": {
"deprecated": false
},
"group": {
"title": "Getting updates",
"anchor": "getting-updates"
},
"object": {
"anchor": "update",
"name": "Update",
"description": "This object represents an incoming update.\nAt most one of the optional parameters can be present in any given update.",
"html_description": "<p>This <a href=\"#available-types\">object</a> represents an incoming update.<br/>\nAt most <strong>one</strong> of the optional parameters can be present in any given update.</p>",
"rst_description": "This `object <https://core.telegram.org/bots/api#available-types>`_ represents an incoming update.\n\nAt most **one** of the optional parameters can be present in any given update.",
"annotations": [
{
"type": "Integer",
"description": "The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you're using webhooks, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially.",
"html_description": "<td>The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you're using <a href=\"#setwebhook\">webhooks</a>, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially.</td>",
"rst_description": "The update's unique identifier. Update identifiers start from a certain positive number and increase sequentially. This ID becomes especially handy if you're using `webhooks <https://core.telegram.org/bots/api#setwebhook>`_, since it allows you to ignore repeated updates or to restore the correct update sequence, should they get out of order. If there are no new updates for at least a week, then identifier of the next update will be chosen randomly instead of sequentially.\n",
"name": "update_id",
"required": true
},
{
"type": "Message",
"description": "New incoming message of any kind - text, photo, sticker, etc.",
"html_description": "<td><em>Optional</em>. New incoming message of any kind - text, photo, sticker, etc.</td>",
"rst_description": "*Optional*. New incoming message of any kind - text, photo, sticker, etc.\n",
"name": "message",
"required": false
},
{
"type": "Message",
"description": "New version of a message that is known to the bot and was edited",
"html_description": "<td><em>Optional</em>. New version of a message that is known to the bot and was edited</td>",
"rst_description": "*Optional*. New version of a message that is known to the bot and was edited\n",
"name": "edited_message",
"required": false
},
{
"type": "Message",
"description": "New incoming channel post of any kind - text, photo, sticker, etc.",
"html_description": "<td><em>Optional</em>. New incoming channel post of any kind - text, photo, sticker, etc.</td>",
"rst_description": "*Optional*. New incoming channel post of any kind - text, photo, sticker, etc.\n",
"name": "channel_post",
"required": false
},
{
"type": "Message",
"description": "New version of a channel post that is known to the bot and was edited",
"html_description": "<td><em>Optional</em>. New version of a channel post that is known to the bot and was edited</td>",
"rst_description": "*Optional*. New version of a channel post that is known to the bot and was edited\n",
"name": "edited_channel_post",
"required": false
},
{
"type": "InlineQuery",
"description": "New incoming inline query",
"html_description": "<td><em>Optional</em>. New incoming <a href=\"#inline-mode\">inline</a> query</td>",
"rst_description": "*Optional*. New incoming `inline <https://core.telegram.org/bots/api#inline-mode>`_ query\n",
"name": "inline_query",
"required": false
},
{
"type": "ChosenInlineResult",
"description": "The result of an inline query that was chosen by a user and sent to their chat partner. Please see our documentation on the feedback collecting for details on how to enable these updates for your bot.",
"html_description": "<td><em>Optional</em>. The result of an <a href=\"#inline-mode\">inline</a> query that was chosen by a user and sent to their chat partner. Please see our documentation on the <a href=\"/bots/inline#collecting-feedback\">feedback collecting</a> for details on how to enable these updates for your bot.</td>",
"rst_description": "*Optional*. The result of an `inline <https://core.telegram.org/bots/api#inline-mode>`_ query that was chosen by a user and sent to their chat partner. Please see our documentation on the `feedback collecting <https://core.telegram.org/bots/inline#collecting-feedback>`_ for details on how to enable these updates for your bot.\n",
"name": "chosen_inline_result",
"required": false
},
{
"type": "CallbackQuery",
"description": "New incoming callback query",
"html_description": "<td><em>Optional</em>. New incoming callback query</td>",
"rst_description": "*Optional*. New incoming callback query\n",
"name": "callback_query",
"required": false
},
{
"type": "ShippingQuery",
"description": "New incoming shipping query. Only for invoices with flexible price",
"html_description": "<td><em>Optional</em>. New incoming shipping query. Only for invoices with flexible price</td>",
"rst_description": "*Optional*. New incoming shipping query. Only for invoices with flexible price\n",
"name": "shipping_query",
"required": false
},
{
"type": "PreCheckoutQuery",
"description": "New incoming pre-checkout query. Contains full information about checkout",
"html_description": "<td><em>Optional</em>. New incoming pre-checkout query. Contains full information about checkout</td>",
"rst_description": "*Optional*. New incoming pre-checkout query. Contains full information about checkout\n",
"name": "pre_checkout_query",
"required": false
},
{
"type": "Poll",
"description": "New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot",
"html_description": "<td><em>Optional</em>. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot</td>",
"rst_description": "*Optional*. New poll state. Bots receive only updates about stopped polls and polls, which are sent by the bot\n",
"name": "poll",
"required": false
},
{
"type": "PollAnswer",
"description": "A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.",
"html_description": "<td><em>Optional</em>. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.</td>",
"rst_description": "*Optional*. A user changed their answer in a non-anonymous poll. Bots receive new votes only in polls that were sent by the bot itself.\n",
"name": "poll_answer",
"required": false
},
{
"type": "ChatMemberUpdated",
"description": "The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user.",
"html_description": "<td><em>Optional</em>. The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user.</td>",
"rst_description": "*Optional*. The bot's chat member status was updated in a chat. For private chats, this update is received only when the bot is blocked or unblocked by the user.\n",
"name": "my_chat_member",
"required": false
},
{
"type": "ChatMemberUpdated",
"description": "A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify 'chat_member' in the list of allowed_updates to receive these updates.",
"html_description": "<td><em>Optional</em>. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify &#8220;chat_member&#8221; in the list of <em>allowed_updates</em> to receive these updates.</td>",
"rst_description": "*Optional*. A chat member's status was updated in a chat. The bot must be an administrator in the chat and must explicitly specify 'chat_member' in the list of *allowed_updates* to receive these updates.\n",
"name": "chat_member",
"required": false
},
{
"type": "ChatJoinRequest",
"description": "A request to join the chat has been sent. The bot must have the can_invite_users administrator right in the chat to receive these updates.",
"html_description": "<td><em>Optional</em>. A request to join the chat has been sent. The bot must have the <em>can_invite_users</em> administrator right in the chat to receive these updates.</td>",
"rst_description": "*Optional*. A request to join the chat has been sent. The bot must have the *can_invite_users* administrator right in the chat to receive these updates.\n",
"name": "chat_join_request",
"required": false
}
],
"category": "types"
}
}